Oracle® Objects for OLE C++ Class Library Developer's Guide 10g Release 2 (10.2) Part Number B14308-01 |
|
Putting data into the database
Long and long raw columns of an Oracle database may contain up to 2 gigabytes of data. You can either put the data into the field piecewise (a piece having a maximum size of 64K) by using ODynaset::AppendFieldChunk or OField::AppendChunk, or you can put the data into the field in one piece using the ODynaset::SetFieldValue or OField::SetValue methods. If the data's length is less than 64K you can use the SetValue method which takes a const char * as an argument. If the data's length is greater than 64K you will need to use the special SetValue methods for which you specify the data length. See SetValue for more information.
Fetching
Because these long columns can contain up to 2 gigabytes of data, it is impractical to automatically retrieve all data from a long or long raw column when it is selected. Instead, the first 64K bytes is retrieved and the Oracle ROWID is cached locally so that the row containing the long or long raw column can be located and the long data retrieved using one of the methods ODynaset::GetFieldChunk, ODynaset::GetFieldValue, OField::GetChunk, OField::GetValue. Oracle ROWIDs are only available on rows which are updatable so any dynaset which contains a long or long raw column greater than 64K bytes must be updatable.
Editing
When a StartEdit is executed, a column's locally cached value is compared to it's current database value. If the values match, then the edit will proceed, else an error is generated. Since long and long raw columns may contain up to 2 gigabytes of data, no comparison of the long and long raw columns is done before an StartEdit is executed.