RE: :Oracle V 1.16 & Oracle type 187 not explicitly supported



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:ron@xxxxxxxxxxxxx]
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
ron@xxxxxxxxxxxxx
http://savage.net.au/index.html




.



Relevant Pages

  • Re: PK and Timestamp in same table?
    ... Laurenq referred to the timestamp *data type* in his post. ... MyPK = @MyPK AND ... > Can't see that adding a timestamp field would speed anything up - in fact ...
    (comp.databases.ms-sqlserver)
  • Re: Using Import and Export Data tool from SQL Server to Oracle with Timestamp
    ... Server 2000 to transfer data from SQL Server into Oracle 9i. ... The timestamp data type has nothing to do with date and time. ...
    (microsoft.public.sqlserver.tools)
  • Re: problems inserting a utf8 timestamp with DBD::Oracle
    ... Don't think so as I'm not using Oracle 9. ... Well I'm not saying it isn't a bug in Oracle but this one is a real problem I cannot easily workaround as really I need a timestamp and a date. ... Client is Oracle 10.2.0 XE ... If you then comment out the 2nd block of code and uncomment the 3rd block of code it works i.e it appears it does not like having a timestamp and a date in the same insert. ...
    (perl.dbi.users)
  • Re: suggestions sought on returning rows from oracle proc and deleting them in same proc
    ... this is not Perl stuff but Oracle PL/SQL. ... deleting them in same proc ... create mytable (id int, created timestamp); ... Perl calls the first one to get the unique ids and the timestamp ...
    (perl.dbi.users)
  • Re: Date different
    ... >> oracle changed the default types returned for their newest oracle drivers, ... What is going on with DATE and TIMESTAMP? ... The more obvious mapping to java.sql.Date was somewhat ... You set the system property by including a -D option in your java command ...
    (comp.lang.java.programmer)

Loading