Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Store pictures on SQL server
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01422743
Message ID:
01422752
Vues:
86
>>It depends on your SQL Server version. In SQL Server 2005 and up, you would use varbinary(max) field for this. Alternatively you may want to simply store paths to the files instead.
>**********************************************************
>Thank you!
>I use SQL server 2005.
>No, I dont want to save the path. The path may not be reachable for every user. Thats why I want to save the file i a field. Its more safe.
>
>When I upload a picture to the SQL server (to a Text field) I do like this:
>
>APPEND MEMO Loctable.MemoField FROM Mypict.jpg
>SQLexec(nHandle,"insert into sqltable (pict) values (?Loctable.MemoField")
>
>But how do I upload to a varbinary(max) field? And how do I download it back to VFP? What type of field do I use in VFP?

In VFP9 you blob field. Issue CURSORSETPROP("MapBinary", .T., 0) before running SQLExec command.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform