The SQLConnect function connects to a specific database as ODBC.
int @SQLConnect(string dsn, string username, string password);
Parameters
string dsn : The data source name set by the ODBC database.
string username : DB Username
string password : DB Password
Return Value
If it is connected, it returns a value greater than 0, and if there is an error or no connection, it returns 0.
Example
id = @SQLConnect("AutoBaseDemoAddress", "", "");
Description :
Assign the value of the connection ID connected to the ODBC database as the original name - AutoBaseDemoAddress, user - default (blank), and password - none (blank) values in the SQL.
If the connection ID value is 0, the SQL connection is not found.
(Note: If the id value is received in analog memory, there is no problem with the variable TYPE, but if the id value is received as an internal variable in the script, the type of the id must be set to DWORD.)
Related Helps