Creating an ODBC Data Source
Use the following instructions to connect Gsharp to your Microsoft Access
database, mydata.mdb
- From the Control Panel - select ODBC Data Sources. The ODBC
Data Source Administrator should appear
- Make sure that User DSN is selected. Click on the Add ... button.
- Select the appropriate driver - in this case Microsoft Access
Driver (*.mdb) and then click on Finish
- Give the data source a name e.g. mydata
- Click on Select ... and then enter the appropriate filename.
- Click on OK.
You have now set up the ODBC data source. To connect to the mydata
source use something like:
echo("connect to Database");
exec sql connect 'admin/@mydata';
exec sql select amount into :y from master;
|
- The above script connects to the ODBC source mydata using the
account admin.
- The amount field of the table master is read into the
Gsharp dataset y.
|