I can't seem to get it to work that way.
I tried:
byte[] fileContents = (byte[])cmd.ExecuteScalar();
and get an invalid cast error
also tried:
long cnt = dataReader.GetBytes(0,0,fileContents,0,1028);
also get an invalid cast error (fileContents[1028] is a predefined array in this case)
When I do:
object fileContents = dataReader.GetValue(0);
and set a breakpoint. The debugger seems to think the result is a string and that it's value = "pk***" where the stars are char(3), char(4) and char(13), then it ends.
My select statement is
SELECT File FROM ArchiveTable where id = 1
In the actual fox table, File is a memo field and id is a number type.
Is there a VFP function that VFPOLEDB would allow that would force File to be converted to a string to a general or some other definate binary format?
Also, I tried using CREATEBINARY() but the length of the memo is greater than 254. After operating on the memo, the select casts the column to a string instead of a memo. Can you force the column to be a memo?
Bill Mittenzwey