Database Operations Using ODBC Driver
Before you can use the NuoDB ODBC driver to connect to a NuoDB database, you must define an ODBC data source for the database. In the following steps, as an example, we use the NuoDB SQL QuickStart database as an example. The database name is
test and it is assumed to be running on the current
localhost with the default port of 48004, user
goalie. For more information about running QuickStart see Running the SQL QuickStart. To define the QuickStart data source, follow these steps:
From the Start menu, search for ODBC in the textbox.
In the search results, click Data Sources (ODBC).
Click Add which will bring up the Create New Data Source dialog.
In the Create New Data Source dialog, select NuoDB ODBC Driver from the list of drivers.
Click Finish to bring up the NuoDB ODBC Setup dialog.
In the NuoDB ODBC Setup dialog, define the data source as specified in the table below.
Data Source Name (DSN)
Data source name.
User name for accessing the database.
Password for accessing the database.
Optional. The default schema is
For example, here’s the completed dialog for the QuickStart database running on
Click Test Connection to verify your connection to the NuoDB database.
Click OK to close the dialogs.
We need an ODBC client to access the Data Source we just created. A good sample one is available on MSDN at ODBC sample. This can be downloaded and built on your machine. The output below uses the MSDN sample program.
Running this ODBC client will pop up the Select Data Source dialog.
Select the Machine Data Source tab, and you should see your newly created Data Source.
Select the NuoDB QuickStart data source and then OK. This will put you at a
SQL COMMAND> prompt. Enter any SQL command, for example, "SELECT * FROM HOCKEY.PLAYERS;":