Re: Dynamic SQL Method 4 and 'LONG' datatype

From: netac <netac_at_worldnet.att.net>
Date: 1997/02/03
Message-ID: <32F658AA.1B6A_at_worldnet.att.net>#1/1


kiddg_at_sealcorp.com.au wrote:
>
> Hi All
>
> I have written an application that is based upon Oracle's Dynamic SQL Method 4 Example. Everyting seems to work fine, except for one datatype that causes some weird errors.
>
> In a table I am doing a select on, I am expecting to return the contents of a column defined as 'LONG'.
>
> After attempting to open a cursor, I get:
> ORA-00997 Illegal use of LONG datatype.
>
> Does anyone have any suggestions...
>
> ...Glen

Its been a while since I did this, but I recall with LONGS is that the basic idea is that you have to present to the database the amount of bytes you want to read from the LONG field in each "fetch". Typically, an apps packs this LONG field so that the first X bytes of the field actually represent the length of the data stored in the LONG. So, on your first pass through you read an arbitrary X number of bytes for the LONG, coerce that to a string datatype, and then examine the packing to tell you how long the LONG really is. You then have some inner loop to continue fetching more chunks of data from the LONG until you are satisfied. Received on Mon Feb 03 1997 - 00:00:00 CET

Original text of this message