User Tools

Site Tools


usingdatabaseserverbeansinscripting

This is an old revision of the document!


Scripting for Database Servers (in MIStudio and TransSECS)

Although there is a lot you can do with just using Database Servers set up in the MIStudio logic and in the Devices of TransSECS and MIStudio, using scripts that reference these beans can be a powerful tool.

These examples assume that you have already set up your database (either local or remote) and have set up the connection in your project using a generic (or specific) DatabaseConnectionManager for your database. In MIStudio you will need to be in LIVE mode (toggle from SIM → LIVE) to enable the database connection during development.

Triggering a Database Server

Database servers can be triggered in a script to run the existing SQL statement. Be sure the SQL statement is set before triggering the bean. Use setSQLStatement() to set the SQL statement, if needed. Also make sure the server has been properly configured to use the DatabaseConnectionManager.

If the database bean is writing data to the database, the SQL Statement should include this current data. No output is generated from the bean when it is triggered.

If the database bean is reading data from the database, the output of the bean after triggering will contain a result (either a single value, array, or 2D array, depending on the bean type).

usingdatabaseserverbeansinscripting.1627497289.txt.gz · Last modified: by wikiadmin

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki