Purpose | The <dbconnect> statement is used to create a connection to a database. This first implementation of the Superx++ run-time engine for Microsoft Windows uses an ODBC connection for this. | |||||||||
Format |
<dbconnect name="{conn name}"> <connectstring>{connect string}</connectstring> <uid>{user id}</uid> <pwd>{user pwd}</pwd> </dbconnect> {conn name} |
the name to be assigned to the connection object once it is created-- it will be used by the other Superx++ database statements |
{connect string} |
the database connect string used to make the connection |
{user id} |
the user id-- not necessary if included in the {connect string} |
{user pwd} |
the user password-- not necessary if included in the {connect string} |
|
|
Example #1 |
<dbconnect name="MyDbConn"> <connectstring>DSN=Northwind;UID=sa;PWD=;server=(local)</connectstring> <uid /> <pwd /> </dbconnect> Creates a database connection called MyDbConn using the connect string specified above. |