ODBC/Data Sources

From J Wiki
Jump to: navigation, search
ODBC: Data Sources | Handles | Data Driver | Error Messages | API: Connect Read Update Create Bulk Insert

A Data Source defines the DBMS driver used, and location of the data files.You need at least one Data Source to use ODBC.

The examples here assume that you are using Windows and have defined a Microsoft Access data source called jdata that references the file ~system/examples/data/jdata.mdb that is distributed with J. In Windows, use Control Panel|Administrative Tools|Data Sources (ODBC). You do not need to have installed Microsoft Access.

Verb ddsrc returns the list of data sources given in the ODBC Control Panel dialog box. The result has 2 columns: the data source name, and a description of the driver:

   load 'dd'
|MS Access Database|Microsoft Access Driver (*.mdb)     |
|Excel Files       |Microsoft Excel Driver (*.xls)      |
|Text Files        |Microsoft Text Driver (*.txt; *.csv)|
|jdata             |Microsoft Access Driver (*.mdb)     |

The result will depend on the drivers you have set up. You should see an entry for jdata, which is the data source name you assigned to the jdata.mdb database.