Hello Everyone, can someone tell what response code I would get if UPDATE succeeded and failed? I want to determine if UPDATE FAILED so I can INSERT record.
TRY
oSql:=TOleAuto():New("ADODB.Recordset")
CATCH
MsgAlert("It seems that your PC does not have MDAC installed OR MDAC is corrupted.")
RETURN (.F.)
END
oSql:CursorType := 1 // opendkeyset
oSql:CursorLocation := 3 // local cache
oSql:LockType := 3 // lock opportunistic
cSqlIns := [UPDATE sailing SET ]
cSqlIns += [scheduleid='] + ALLTRIM( cScheduleId ) + [',]
cSqlIns += [carrier='] + ALLTRIM( cCarrier ) + [',]
cSqlIns += [vessel='] + ALLTRIM( _VesClean( cVessel ) ) + [',]
cSqlIns += [voyage='] + ALLTRIM( cVoyage ) + [']
cSqlIns += [ WHERE scheduleid='] + ALLTRIM( cScheduleId ) + [']
TRY
oSql:Open( cSqlIns, xCONNECT )
CATCH oError
MsgAlert( "Unable to Perform Table Update, Process Aborted." + cEol + cSqlIns + cEol + oError:Description, "XML to SQL" )
RETURN (.F.)
END