run_sql_file
run_sql_file function has 1 variants:
Description
run_sql_filefunction opens and execute all sql commands in the file sequentially.Each sql commands must end wih ';' character.
If error occured during execution, the function execution is stopped immediately and
database specific error message is returned.
Database script file path is relative to the
SodiumServer.Exefile.Database script file can contain DML or DDL statements but cannot contain
beginandendblock since Sodium executes each command separated by ';' character.
Declaration
char run_sql_file(char filePath);Parameters
char filePath Sql script file full path.
Return Value
Returns error message if any error message occured.
Example
void dual.htsql_demo_installation() {
char ret = run_sql_file('htsql_demo_installation.sql');
if (ret is not null) then
message('Error occured : ' || ret);
else
message('Sodium demo schema and objects has been created.');
end if;
}Last updated
Was this helpful?