Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
First attempt with BLOBs
Message
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01010637
Message ID:
01010662
Views:
27
This message has been marked as the solution to the initial question of the thread.
>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.
* Map SQL Server Image to VFP Blob.
= CURSORSETPROP("MapBinary", .T., 0)
* In addition you can allow SQL Server varchar to map to VFP varchar
= 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--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform