>I trying to work a little with the new blob data type in VFP 9 and I have a quick question. I have a SQL server table that has been used to store blobs and I am trying to retrieve that information and return it to a VFP cursor that I have predefined. I am using the sqlexec() function to call a stored procedure that will return the necessary information. When I call the procedure the resulting querey has a general field for the blob info. Is this what is supposed to happen? If not how would I get that information into the proper data type? If it is what is supposed to happen how do I display the information? (doc, xls, giff, tiff, etc.)
>
Hi Kelly,
As you know FoxPro is all about backward compability. In previous version SQL Server blob was mapped to a General field. It still default maping for VFP9 as well but you can changed it with CURSORSETPROP() function.
= CURSORSETPROP("MapBinary", .T., 0)
= CURSORSETPROP("MapVarchar", .T., 0)
lnResult = SQLEXEC(...)
If blob returned is an image supported by VFP you can use PictureVal property of the Image control to display it. Other types, (doc, xls, e.t.c.) you can display by writing blob field to a file and using Web broser control, ShellExecute, WSH Run Method, related application, e.t.c.
--sb--