odbc.connect
Create a database connection. You can connect to a database using a string connection or a DSN name.
The method is called in order to connect to the database with the help of the string connection. Use The ODBC connection string for this purpose, that contains a driver type, a database name and some additional parameters. The example below shows a type of the string connected to the SQL server: "Driver={SQL Server};Server=MSSQLSERVER; Database=mydatabase;Trusted_Connection=yes;"
str connectstr
)
Parameters
connectstr | Connection string. |
Return value
Returns 1 if the connection is successful; otherwise, returns 0.
odbc.connect
This method is used to connect to the database through the previously defined connection (the DSN name).
str dsn,
str user,
str psw
)
Parameters
dsn | Name of a previously defined connection - DSN. |
user | User name. |
psw | User password. |
Return value
Returns 1 if the connection is successful; otherwise, returns 0.
Related links | Source |