Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why the varible can not got value?
Message
From
12/11/2003 05:51:06
Michale Chen
Shijiazhuang ZhiYuan Crop.
Shijiazhuang, China
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00848735
Message ID:
00849014
Views:
27
Hello David, my code is like this could you give me any advice--why the varible 'lcfield' can't got vallue?


LPARAMETERS hConnect, lview
sele &lview

SQLSETPROP(hConnect,'transactions',2)

BEGIN transaction
ISuccess=TABLEUPDATE(.T.,.f.)
IF ISuccess=.F.

SQLExec( hConnect,'IF @@TRANCOUNT > 0 ROLLBACK')
ROLLBACK
¡¡=AERROR(aErrors)
DO CASE
CASE aErrors[1,1]=1585

local lnfields
lnfields = FCOUNT()
DIMENSION laconflict[lnFields]
local nnextmodified
nNextModified = GETNEXTMODIFIED(0)
DO WHILE nNextModified <> 0
GO nNextModified
FOR nField=1 to FCOUNT()
lOCAL lcfield
¡¡lcField=field(nField)

.......

nNextModified =GETNEXTMODIFIED(nNextModified)
ENDDO
¡¡¡¡¡¡¡¡=TABLeupdate(.T.,.t.)
SQLCOMMIT(hConnect)
OTHERWISE
MESSAGEBOX("unknowing error:"+ STR(aErrors[1,1]),'system information')
RETURN .f.
ENDCASE
ELSE
LOCAL nns
nns=SQLCOMMIT(hConnect) SQLExec(hConnect, 'IF @@TRANCOUNT > 0 COMMIT')

IF nns=1
=messagebox('sucessfully saved','system information')
END transaction
RETURN .t.
ELSE
END transaction
ENDIF
ENDIF
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform