Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Insert FRom VFP to SQL
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Titre:
Insert FRom VFP to SQL
Divers
Thread ID:
00127638
Message ID:
00127638
Vues:
60
The Followong is my code to insert a new record into a Stock Table of a SQL Server database from a standard VFP Table.

nc=SQLCONNECT('winpos',"sa","")
select stock
cSQL = "Insert INTO STOCK ( "+;
"CISBN, "+;
"CBARCODE, "+;
"CPRODCODE,"+ ;
"CPRODNAME)"+;
"Values ("+;
"'"+Allt(STOCK.CISBN)+"', "+; "'"+Allt(STOCK.CBARCODE)+"', "+;
"'"+AlltSTOCK.CPRODCODE)+"', "+;
"'"+Allt(STOCK.CPRODNAME)+"')"
sqlexec(nc,cSQL)

This code Works Fine as Long as there is no Single Quotation Marks in any Field ie '

Does any body have a solution of how to solve this problem. I cannot get rid of any quotation marks in the fields. There are authors names Like O'Donnel etc
Fred Besterwitch, MCP

The harder you work. The luckier you get.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform