Re: manipulating LONGs

From: BO/EBC/KX/RGFC Roger Bjaerevall 08-682 4851 <ebcrbj_at_ebcw150.ericsson.se>
Date: Fri, 5 Aug 1994 10:42:05 GMT
Message-ID: <1994Aug5.104205.13273_at_ericsson.se>


In article 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?

I do not know if it is possible to fetch data in chunks using Pro*C. In OCI you can use oflng() ("Fetches a portion of a LONG or LONG RAW column").

Note that it is not possible to store chunks in a LONG not even with OCI...

I've posted excactly the same question some months ago and have also been in contact with ORACLE but there is not way to store chunks.

Why announce that the database can hold values up to 2Gb when it is almost impossible to store more than 10Mb in a single call???

The only way is to have > 2Gb virtual memory and malloc that size before the insertion... (Normally we have between 24 and 64 Mbytes in our SUN's).

+------------------------------------------------------------------+
+       _/_/_/    _/_/_/   _/_/_/_/  Roger Bjärevall               +
+      _/    _/  _/    _/       _/   BO/EBC/FL/RGFC                +
+     _/    _/  _/    _/       _/    Ericsson Business Networks AB +
+    _/_/_/_/  _/_/_/_/       _/     135 83 Tyresö                 +
+   _/  _/    _/    _/  _/   _/      Sweden                        +
+  _/    _/  _/    _/  _/   _/       +46 8 6824851                 +
+ _/     _/ _/_/_/      _/_/         email: ebcrbj_at_ebc.ericsson.se +
+------------------------------------------------------------------+
Received on Fri Aug 05 1994 - 12:42:05 CEST

Original text of this message