Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Inserting binary data into SQL table using SQLEXEC()
Message
From
24/10/2004 17:24:48
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
00953897
Message ID:
00954141
Views:
26
>>Can anybody offer me any code example(s) for inserting a binary (in my case a .GIF file) into an SQL table using VFP SQLEXEC()?
>
>
>Andrew,
>
>Take a look at How to work with Image field type on SQL Server (binary data)? FAQ #7995. In VFP9 it'll be much easier, thanks to the blob data type.

Hi Sergey,

Thanks for the pointer. I have downloaded the FOXCRYPTO.DLL and am trying to use the example in the FAQ that you sent me to, as follows:


set library to foxcrypto.fll
? SQLEXEC(nSql, "UPDATE mainmap SET mapimage = " + StrToHex(FILETOSTR('c:\image_map.gif')) + " WHERE mapid=1")


I get the message that StrToHex is an unknown program. I've looked into the documentation of foxcrypto and don't see any reference to this function. I suspect I'm missing something very basic. Can you help me see it?

Thanks again!

Andrew
On a CLEAR day you can see forever.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform