Using TOracleQuery with LongRaw Columns

Suppose I want to pull a large binary file (2 gigs)from an Oracle table on a database server and save it as a file on a client machine. Is there a way to access the Oracle buffer piecewise (16K chunks) instead of pulling over the whole record? Surely there is a way. I've tried using TOracleQuery.GetLongField but the initial Query itself loads the entire Blob into memory.
 
I assume you are using Net8 and Oracle8, and want to piecewise fetch a long raw column (not a BLOB or BFILE).

If the session is in OCI8 (Net8) mode, then long raw columns are indeed always completely fetched from the database. To fetch just pieces of a long raw column, set TOracleSession.Preferences.UseOCI7 to True. The OCI7 mode of Net8 allows piecewise fetching of long raw columns, but does not allow any Net8 specific features (LOB's and Objects). To get both, you must convert your long raw columns to BLOB columns and run in OCI8 mode. BLOB columns can be randomly accessed, which is even more flexible than a long raw access in OCI7 mode.

------------------
Marco Kalter
Allround Automations
 
Thanks Marco.... Yes I am using Oracle 8.05 on both client & server but I'm not using objects so I set OCI7 mode and everything works fine.
 
Back
Top