PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: Guillaume Mallet <gmallet at wanadoo dot com>
Subject: Re: Turning on DateTime use in sybperl 2.09
Date: Feb 12 1998 5:19PM

Hi Michael,

Thanks for replying so promptly :-)

I tried what you suggested, naturally it worked, so all is fine. Then I
removed the "$dbh->{UseDateTime} = TRUE;" line from my script, yet it didn't
yield any error although my next line is as follows : $date =
$dbh->newdate('Jan 1 1998');

I suspected some kind of persistence of the UseDateTime option somewhere in
the guts of I'm not sure what, so I tried to force the opposite, namely :
"$dbh->{UseDateTime} =false;", after creating my database handle. Perl still
didn't sound off at my call to newdate.

Now i suppose i should just be happy and content myself with the fact that i
can use DateTime objects if i want to, but, you know, something bugs me in
all this. I mean, how come does it seem to work no matter what ?

At 07:25 12/02/98 -0800, you wrote:
>Guillaume Mallet wrote:
>
>> 
>> In Michael Peppler's documentation for sybperl-2.09, it says that special
>> handling of DateTime values "is turned off by default for performance
>> reasons. You can turn it on per datatype and dbh, or via the module
>> attribute hash (%Sybase::DBlib::Att and %Sybase::CTlib::Att)".
>
>IN your script you can say:
>
>$Sybase::DBlib::Att{UseDateTime} = TRUE; # or 1
>
>You can also turn it on for a particular database handle:
>
>$dbh = new Sybase::DBlib user, pwd, server;
>$dbh->{UseDateTime} = TRUE;
>
>Michael
>-- 
>Michael Peppler       -||-  Data Migrations Inc.
>mpeppler@datamig.com  -||-  http://www.mbay.net/~mpeppler
>
>