Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Storing File Contents in SQL Server Image Data Type
Message
De
10/01/2001 18:28:41
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Titre:
Storing File Contents in SQL Server Image Data Type
Divers
Thread ID:
00461989
Message ID:
00461989
Vues:
48
I was trying to write an application that would store a binary image of actual file contents to SQL Server. I stored the file contents to a variable using lcContents = FILETOSTR( ) and then tried to include this in an INSERT command:

SQLEXEC( lnConn, [INSERT INTO MyTable ( ,,, Fil_Contents ) VALUES ( ,,, ?lcContents )] )

This failed with the following error from SQL Server:

Connectivity error: [Microsoft][ODBC SQL Server Driver][SQL Server]Operand type clash: text is incompatible with image

Any idea what I did wrong? The field Fil_Contents is using the "image" data type, which BOL indicated was correct for binary data larger than 8K.

TIA,

-- Randy
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform