| Gentee Programming Language > Documentation > Libraries | Download documentation |
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=MSQLSERVER;Database=mydatabase;Trusted_Connection=yes;"
uint odbc.connect( str connectstr )
connectstr Connection string.
Returns 1 if the connection is successful; otherwise, returns 0.
This method is used to connect to the database through the previously defined connection (the DSN name).
uint odbc.connect( str dsn, str user, str psw )
dsn Name of a previously defined connection - DSN. user User name. psw User password.
Returns 1 if the connection is successful; otherwise, returns 0.
See alsoCopyright © 2004-2006 Gentee Inc. All rights reserved. |