Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SPT Errors
Message
 
 
To
17/05/2005 16:24:59
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01015079
Message ID:
01015088
Views:
25
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform