BLOBs
Home Up OleRead MkTbls OleUpdate OSchema OLAP OleDB25 Scroll MkTblsEx FastLoad FilterSort DataShape FastAccess Indexes MultiRecords MultiProcs BLOBs

 

Example Blobs:    

        BLOBs, binary large objects, is a big sequence of bytes with one of three data types, DBTYPE_STR, DBTYPE_WSTR and DBTYPE_BYTES. BLOBs are usually long texts, images, files, and so on. Typically, it is not a trivial task to retrieve and update a BLOB from and into a data source. If a table has two or more BLOB fields, it usually makes you feel painful when programming. However, OleDBPro provides two classes, CRBase and CBatchParam<T> to deal with them easily no matter if a provider supports the property DBPROP_MULTIPLESTORAGEOBJECTS. After experimenting this example, you will feel very confident with them. This example answers your following questions.

  1. How to determine if a field is BLOB.

  2. How to get the length and status of a BLOB field.

  3. How to fetch Blobs from a table with multi-BLOB fields.

  4. How to use a row set object to update, insert or delete Blobs into or from a table with multi-BLOB fields.

  5. How to use a CBatchParam<T> object to complete the above task instead of Related-related object.

        It is not good idea to store thousands of big BLOBs into a table, but it is definitely worth to use a DBMS to store hundreds of BLOBs for simplification of securing, sharing and managing BLOBs over network and multiple clients. 

        Finally, it is notified that you can only experiment this example after you run the example MkTbls.

Goto the list of examples