I have a table with blob field and some others as well. I am trying to read blob field and save it to file using IBlobStream, and the thing compiles. The problem comes up in run-time, when calling blobStream.SaveToFile() method, saying:
'object' does not contain a definition for 'SaveToFile'
the following code:
int blobFieldID= table.Fields.FindField("MODEL_NAME");
int nameFieldID= table.Fields.FindField("MODEL");
ICursor cursor = table.Search(null, true);
IRow row = cursor.NextRow();
while (row != null)
{
IBlobStream blobStream = (IBlobStream)row.get_Value(blobFieldID);
blobStream.SaveToFile(@"C:\TEMP\" + row.get_Value(nameFieldID) + ".tbx"); //error
row = cursor.NextRow();
}
When i hover mouse over SaveToFile method it says:
(dynamic expression)
This operation will be resolved at runtime
I can't figure out what's the problem in here
IMemoryBlobStream
instead ofIBlobStream
(this really shouldn't make a difference though). – Petr Krebs Apr 16 at 15:49