Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error inserting blob into sql server
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:
01024862
Message ID:
01024871
Views:
22
>I am trying to get a procedure to insert blob information into a sql server table. I can get a small text file to insert but when I try an xl file ( or something else) I get a type mismatch from the sp that I have created. I have read the file to a memory varialbe (filetostr()) and passed that to the stored procedure. Is VFP 9 truncating the value that is being passed or do I need to try a different approach to inserting the information in SQL other than an INSERT statement?
>

Hi Kelly,

You've to convert file to hexbinary. It limits the size of the file to around 8MB
lcHex = STRCONV(FILETOSTR(lcFileName),15)
I would create a cursor with one blob field, use APPEND MEMO to put a file into it and than use it as parameter to your SP.
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform