Scriptcase sc_exec_sql with error handling

sc_exec_sql with error handling

The macro  sc_exec_sql()  is used in Scriptcase to execute SQL commands. Unfortunately it does not return errors when executed.

As another way the macro  sc_select()  can be used to execute SQL commands.
And it is abe to return (and analyse) the errors.

Hint: sc_select can be used to execute ANY SQL commands, not only to select data.

If you want to execute SQL-commands as UPDATE, INSERT,DELETE,… just ignore any returned data. Only check if the {recordset} equals false.

Sample:

Replace Scriptcases's sc_exec_sql with sc_select for error handling

Posted in Scriptcase Sniplets Tagged with: , , , , ,