Macro sc_error_continue

Macro sc_error_continue

When we want to insert, modify or delete a record within our form it can not be possible because of the database errors that are previously configured, which can be generated by ourselves by means of triggers, for example:


In this example we create a trigger for each time you want to unsubscribe or delete a record from a specified table.

How can this error be already configured by default:

[Microsoft][Controlador ODBC SQL Server] [SQL Server] You can not delete the record


Then, to capture those types of errors, we have a macro called sc_error_continue, whose function is to capture the errors that are generated from the database.


An example would be when wanting to delete, then there is a ScriptCase variable that contains the message error extracted from the database, whose variable is called sc_error_delete which has the following message in it: You can not delete this record.


Then we find an example of how the macro can be used:



You can also find the information within the manual: Click Here

    • Related Articles

    • Macro sc_date

        Scriptcase provides a very useful macro for manipulating dates, which is a very laborious process, however with the use of the sc_date macro (Increments and Decrement Dates), it is much simpler, example:   sc_date (Date, format, operator, D, M, A) ...
    • Macro sc_block_display

      In this example, we will see how to use the sc_block_display macro in an Ajax event using a Radio button on a Form, this macro is intended to hide or show a block. The steps in this example: Configuring Radio type field Configuring and creating ...
    • Using the sc_confirm macro

      In this article, see a practical example of using the sc_confirm macro. This macro can only be used on PHP buttons created in the toolbar of form and control applications, with the aim of confirming the action's excursion. See how to create a PHP ...
    • Using the macro sc_date_dif_2

      To calculate the difference between two dates we have the macro sc_date_dif_2, in this example we will see how it works and how to use it. 1. The format with which you are keeping within the database must be taken into account: Database Format Macro ...
    • Resolving email sending issues with the sc_mail_send macro on Linux or Mac.

      If, when using the sc_mail_send macro in a Linux or MAC environment, the following error occurs: Fatal error: Uncaught Swift_TransportException: Connection could not be established with host smtp.gmail.com [ #0] in ...