Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
TRY/CATCH With SQL
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
TRY/CATCH With SQL
Miscellaneous
Thread ID:
01270081
Message ID:
01270081
Views:
52
The following does not trigger the CATCH block when a SQL error occurs.
oException.ErrorNo = 0 even when a SQL error occurs. What am I doing wrong?
oException = CREATEOBJECT("RFException")

TRY
	SQLEXEC(._iSQLConnHandle, sQuery, sTableName)
CATCH TO oException
ENDTRY

IF ._HandleError(oException)

	SQLEXEC(._iSQLConnHandle, "SELECT @@ROWCOUNT AS AffectedRows", "SQLTally")
	iRowsAffected = SQLTally.AffectedRows

	USE IN SQLTally

ENDIF
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Next
Reply
Map
View

Click here to load this message in the networking platform