SQL_COLUMN_PRECISION and SQL_COLUMN_DISPLAY_SIZE with timestamp values



Hello,

i have a great problem with my odbc library connected to an oracle
instantclient odbc driver (connected to a oracle 10.2 XE database).

The SQLColAttribute function returns for timestamp(6) datatypes 26 Byte
as DISPLAY_SIZE and PRECISION. (20byte + 6byte precision as described in
msdn)

But if i debug the SQLFetch call, i can see that the driver writes
beyond the allocated buffer:

l_stRow[<column>][<byte>]

....
l_stRow[1][25] 51 '3' //last byte from timestamp value
l_stRow[1][26] 0 '' //looks like Zero-Termination of SQLFetch?
l_stRow[1][27] 48 '0' //additional '0' from driver?
l_stRow[1][28] 48 '0' //additional '0' from driver?
l_stRow[1][29] 0 '' //Zero-Termination from driver?


anybody has seen something similar? Is this a bug in oracle odbc driver?
Are there any workarounds (except to allocate size * 2 as quick and
dirty solution)

--
Markus Schulz
.



Relevant Pages

  • Re: Need help with Access 97 and Oracle 9i
    ... I'm trying to make the connection on the my local machine. ... discussed using ODBC driver to connect to Oracle. ... I found that the Microsoft ODBC Driver doesn't ... I'm looking for anything I can get; suggestions, recommendations, ...
    (microsoft.public.access.externaldata)
  • RE: ORACLE DRIVER
    ... The thing is that I'm using in a Linux machine. ... So is there any free Oracle ODBC driver for Linux? ... UnixODBC is a freeware but couldn't find any free Oracle Drivers. ...
    (perl.dbi.users)
  • Re: Need help with Access 97 and Oracle 9i
    ... Not sure if our google results were the same. ... discussed using ODBC driver to connect to Oracle. ... I found that the Microsoft ODBC Driver doesn't ... I'm looking for anything I can get; suggestions, recommendations, required ...
    (microsoft.public.access.externaldata)
  • RE: SQLFetch() very slow with Oracle
    ... Based on my understanding, the problem is when calling the SQLFetchto ... fetch the data from Oracle database, you found Microsoft's ODBC driver is ... so much slower than the Oracle driver to complete the above operation. ... ODBC driver and Oracle driver just as you mentioned. ...
    (microsoft.public.vc.database)
  • Oracle 10.2 ODBC driver: SQLDescribeCol returns too small a precision for numeric expressions
    ... I hope this is the correct newsgroup to ask about the Oracle ODBC driver ... I allocate a buffer of size Scale+Prec+2 bytes and call SQLBindCol ... the computed expression has up to 16 digits ...
    (comp.databases.oracle.server)