Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SPT Syntax Issue
Message
 
 
À
06/07/2010 13:16:19
Steven Dyke
Safran Seats USA
Texas, États-Unis
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 SP1
OS:
Windows XP SP2
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01471541
Message ID:
01471552
Vues:
39
>When I try the quotes I get a message that the date syntax is wrong.

Use parameters. Boris showed the syntax. Although I'll move alltrim stuff out.
scatter memvar 
perform alltrim manipulations when needed
TEXT TO insertSImain NOSHOW PRETEXT 15 TEXTMERGE
     Insert Into webprddt7.qasimast(recseq, insptype, docno, partno,  shipsetid, dwgrev, vendorcode,
                                    faiindex, lotqty, sampletype, sampleqty, accptdqty, rejdqty, inspdate, inspector,
                                    inspsource, rejtindex)
     VALUES
	(?x,1, ?m.docno, ?m.partno,
         ?ALLTRIM(testconnQuery.jobno), ?ALLTRIM(testconnQuery.revision), ?ALLTRIM(testconnQuery.vendorcode),
         ?testconnQuery.faiindex, ?testconnQuery.lotsize, ?testconnQuery.sampletype, ?testconnQuery.cmss, ?testconnQuery.cmaa,
	 ?m.cmar, ?m..inspectdt, ?m.inspectsna,1, ? y)
ENDTEXT
? insertSImain
If SQLEXEC(testconn, insertSImain) <> -1 Then
   =SQLCOMMIT(testconn)
ELSE
    If Aerror(odbcerrormsg) > 0 Then
	MessageBox(odbcerrormsg(2))
    EndIf
EndIF
* Make extra needed changes
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