General information
Category:
Coding, syntax & commands
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only