Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error inserting blob into sql server
Message
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01024862
Message ID:
01024871
Vues:
21
>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--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform