Ron,

The timestamp data type was introduced relatively recently to Oracle, and
has the capacity to store fractional seconds (basically to the resolution of
your OS clock).

Unless you genuinely need fractional seconds, you can use the ordinary old
DATE data type which stores date+time (to the closest whole second).  If you
do this, DBD::Oracle should have no problem with your data.  I think the
problem is that DBD::Oracle has not yet absorbed some of the newer data type
functionality of Oracle.

Hope this helps,

Steve

-----Original Message-----
From: Ron Savage [mailto:[EMAIL PROTECTED] 
Sent: Monday, 5 December 2005 3:47 PM
To: List - DBI users
Subject: DBD::Oracle V 1.16 & Oracle type 187 not explicitly supported

Hi Folks

o I'm writing code based on Class::DBI V 3.0.11.

o I do
__PACKAGE__ -> db_Main() -> do("alter session set nls_timestamp_format =
'YYYY-MM-DD HH24:MI:SS'") if ($config{'dsn'} =~ /Oracle/);

o I have a debug write after every line, so I know that it's when I try to
read
the timestamp field below that the error is thrown

o I create the column like this:
evaluation_timestamp timestamp not null

o I have this value stored in the column: 2005-12-05 08:00:00 in each record

o I try to inflate it with:
__PACKAGE__ -> has_a
(
        evaluation_timestamp    => 'Time::Piece',
        inflate                                 => sub{scalar Time::Piece ->
strptime(shift, "%Y-%m-%d %H:%M:%S")},
);

o I get an error at line 298 of DBD::Oracle V 1.16:
Field 3 has an Oracle type 187 which is not explicitly supported

Any ideas?

--
Ron Savage
[EMAIL PROTECTED]
http://savage.net.au/index.html




Reply via email to