Re: manipulating LONGs

From: Scott Urman <surman_at_wwsun10.us.oracle.com>
Date: 5 Aug 1994 16:51:19 GMT
Message-ID: <31tqm7$aah_at_dcsun4.us.oracle.com>


In article <31qdla$4ff_at_scafell.gtl.demon.co.uk>, lts_at_gtl.demon.co.uk (Lincoln Scott) writes:
|>
|> I know that the LONG datatype can be used to store variable length
|> character data up to 2 GB.
|>
|> When retrieving data from a column of type LONG in a Pro*C program,
|> I must declare a buffer large enough to hold the data. I could
|>
|> (i) declare an enormous buffer and work with that or
|>
|> (ii) declare a buffer that I think is large enough and check
|> for truncation using the indicator variable and resize the buffer
|> as required.
|>
|> Actually, I don't want to do either of these. I would like to fetch
|> the LONG data in chunks, say 2k at a time. And for that matter, I
|> would like to be able to put data into a LONG column in chunks.
|>
|> Is this possible? Any elegant work-arounds?
|>
|> Thanks in advance,
|>
|> Lincoln Scott
|>

It is currently possible to fetch from a long column in chunks using the OCI routine oflng(). It is not currently possible to insert in chunks (although it should be). There are several enhancement requests already to add this functionality. Note that you can mix Pro*C and OCI code, so you can at least fetch in chunks using OCI while the rest of the program uses embedded SQL. Received on Fri Aug 05 1994 - 18:51:19 CEST

Original text of this message