Executing SQL statements (Insert, Update and Delete)

Executing SQL statements (Insert, Update and Delete)

With the macro macro sc_exec_sql you can execute SQL statements. Note that is useful to insert, update and delete because you dont get the output. If you need te output, use sc_lookup.

Sintax:

sc_exec_sql("SQL statement", "connection")The parameter connection is optional. 

Example:

 if(condition)

{

sc_exec_sql("UPDATE table SET field='{field_value} ' where id={field_id}");

}


    • Related Articles

    • Manual Update - Linux

      Before performing any procedure we recommend performing a backup of your projects. To back up Scriptcase: Go to Options > Settings, in the side menu go to Services > Backup. A file (.ZIP) will be generated with all your projects, save this file to a ...
    • Manual Update - Mac OS

      Before performing any procedure we recommend performing a backup of your projects. To back up Scriptcase: Go to Settings> Administration, in the side menu go to Services> Backup. A file (.ZIP) will be generated with all your projects, save this file ...
    • Update of the security module synchronization application

      In order to improve security in our projects, we made several changes to the application files. One of these changes affected a crucial file that tells applications how to sync. To ensure that the synchronization continues to work correctly, we made ...
    • Manual Update - Windows

      Before performing any procedure, we recommend performing a backup of your projects. To back up Scriptcase: Go to   Settings > Administration, in the side menu go to   Services > Backup.   A file (.ZIP) will be generated with all your projects, save ...
    • Update a widget based on another widget.

      1-) Create a Grid (product table), whose configuration is     Grid Modules → Orientation to Slide     Configuration → Columns per pages: 5     Link between Applications → Link to a blank application that will perform the update, where the link will ...