Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SPT Errors
Message
 
 
À
17/05/2005 16:24:59
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
Titre:
Versions des environnements
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01015079
Message ID:
01015088
Vues:
26
I am not sure where the problem lies, but let's try a different (better/easier?) approach to doing what you want.
lcUpdateSQL = [UPDATE webprddt6.drawmstrp SET dm_next_assembly = ?ALLTRIM(mapicstempForCertification.nextassy)]

** I assumed dm_next_assembly is a character type in the above SQL

SELECT mapicstempForCertification
SCAN
    IF SQLEXEC(mapictest2, lcUpdateSQL) < 0
       *!* update for that record failed
    ELSE
       =SQLCOMMIT(mapictest2)
    ENDIF
ENDSCAN
SQLDISCONNECT(mapictest2)
If you need to update the values of more fields, just add them to the lcUpdateSQL string. If the above fails, I have also noted that you do not have a TABLEUPDATE() command before your SQLCOMMIT.

>Why would this code:
>
>lcConnection3 = 'DRIVER=Client Access ODBC Driver (32-bit);SYSTEM='+(cSystem)+';DefaultLibraries='+(cDeaultLib)+';TRANSLATE=1;UID='+(cUID)+';PWD='+(cPWD)+';SIGNON=0;SSL=2'
>mapictest2 =SQLSTRINGCONNECT(lcConnection3)
>Select mapicstempForCertification
>
>Scan
>queryString4 = "Select * From drawmstrp Where dm_drawing_number = '" + PadR(Left(mapicstempForCertification.drawingno,10),12) + "'"
>
>queryString4b = "Select * From drawmstrp Where dm_drawing_number = '" + PadR(Left(mapicstempForCertification.drawingno,6),12) + "'"
>
>If SQLEXEC(mapictest2, queryString4, "sdequery4") <> -1 And reccount("sdequery4") > 0 Then
>=CURSORSETPROP("Tables" , "webprddt6.drawmstrp")
>=CURSORSETPROP("UpdateNameList" , "dm_drawing_number webprddt6.drawmstrp.dm_drawing_number, dm_next_assembly webprddt6.drawmstrp.dm_next_assembly, dm_files3 webprddt6.drawmstrp.dm_files3")
>=CURSORSETPROP("KeyFieldList", "dm_drawing_number")
>=CURSORSETPROP("UpdatableFieldList", "dm_next_assembly, dm_files3")
>=CURSORSETPROP("SendUpdates", .T.)
>
>Replace dm_next_assembly With mapicstempForCertification.nextassy
>=SQLCOMMIT(mapictest2)
>
>EndScan
>
>=SQLDISCONNECT(mapictest2)
>
>Generate this error?
>
>"Table buffer fot alias sdequery contains uncomitted changes" just after the first record of the scan.
Mark McCasland
Midlothian, TX USA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform