Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle 10.2 ODBC driver: SQLDescribeCol returns too small a precision for numeric expressions

Re: Oracle 10.2 ODBC driver: SQLDescribeCol returns too small a precision for numeric expressions

From: Wolfram Roesler <wr_at_spam.la>
Date: Wed, 25 Jul 2007 14:31:42 +0000 (UTC)
Message-ID: <Xns9978A82317A1Cwrgrpde@news.albasani.net>


I wrote:

> Now, with the 10.2 ODBC driver, SQLDescribeCol returns a precision of
> 15 for that same expression. I thus allocate a buffer of 17 bytes, but
> the expression returned by Oracle is 18 bytes long (one digit before
> the decimal point, the decimal point itself, and 16 digits following).
> So, the result doesn't fit into the buffer, and the query aborts with
> the error "SQLSTATE=01004: [Oracle][ODBC]String data, right
> truncated".

I should note that the query doesn't actually abort, but SQLGetData returns SQL_SUCCESS_WITH_INFO, with isn't actually an error but can be treated like SQL_SUCCESS, and the proper data (up to the precision returned from SQLDescribeCol) has been placed in my buffer. Yet, I'm concerned about that precision being too small and truncated data being transferred to my application.

Thanks
W. Rösler Received on Wed Jul 25 2007 - 09:31:42 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US