Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Truncation error retrieving 'long' through ODBC
Just make a call to SQLGetData and pass a buffer the size of the amount
you want back. The driver should truncate the long data to the size
passed in.
Call SQLGetData again on the same column and you get the next part of
the long.
SQLGetData returns SQL_SUCCESS_WITH_INFO if truncation occurs
and SQL_SUCCESS if all goes well.
Call SQLFetch and process the next row.......
Easy ;)
Cheers,
Stuart.
Dskdrv wrote:
>Hi,
>
>A question about getting data from Oracle through ODBC on a PC.
>When getting the text column from table DBA_VIEWS through ODBC, an truncation
>error is
>returned. In SQl*Plus, 'select text from dba_views;' results in the text being
>truncated
>to 80 chars. It can be seen that 'text' is of type long. Command 'show long'
>shows 80.
>Setting long to something bigger like 500 results in the complete text column
>appearing.
>
>The question is how to handle this problem from a C program which is retrieving
>data
>through ODBC ? Write a C function to set long in Oracle ? Any other ideas ?
>
>Using Oracle 8.0 and 8i with Oracle ODBC driver.
>
>Thanks for any help.
>
Received on Tue Nov 20 2001 - 11:54:52 CST
![]() |
![]() |