issacszc

How to read or write  blob field of table  in Geodatabase ?

Discussion created by issacszc on Aug 16, 2010
This is my code:

IFeatureWorkspacePtr ipFeatureWorkSpace(ipWorkspace);

ITablePtr ipTable;
hr = ipFeatureWorkSpace->OpenTable(CComBSTR("DATA"), &ipTable);

ICursorPtr ipCursor;
hr = ipTable->Search(NULL, VARIANT_FALSE, &ipCursor);

IRowPtr ipRow;
hr = ipCursor->NextRow(&ipRow);

VARIANT var;
hr = ipRow->get_Value(20, &var); //The type of 20th Field is Blob

IMemoryBlobStreamVariantPtr ipMemoryBlobVariant(CLSID_MemoryBlobStream);
hr = ipMemoryBlobVariant->ImportFromVariant(var); //hr is -2147024809, AE hasn't this error code

How to read or write blob field of dataset in Geodatabase?

Outcomes