dbConnectDSN |
Top Previous Next |
Syntax POINTER = dbConnectDSN(DSNname as STRING,options as STRING,OPT parwnd as POINTER) Description Connects to a database using an ODBC data source name (DSN). Parameters DSNname - Data source name as shown in the Data Sources (ODBC) control panel. options - Connection options for the database parwnd - Optional. EBASIC WINDOW type to use as the parent for error dialogs. Return value A pointer to the connected database or NULL if the connection could not be established. Remarks The options a DSN supports is driver dependant. Any options supplied are given to the driver in addition to the ones specified in the DSN record. In most cases the string should be left as an empty string "". A successful connection must be established before any SQL statements can be executed. Before the application exits it needs to disconnect from the driver using dbDisconnect See Also: dbEnumDrivers, dbConnect, dbDisconnect Example usage pdb = dbConnectDSN("INVENTORY_XYZ","") |