![]()
Step 3: Connecting dBASE to mySQL using the BDE
This is Step 3 of an installation and configuration of the mySQL 4.1 database server on a Windows 2000 Professional machine. Click here to go to the index.
- On the previous page, we got to the point of testing and successfully connecting to our installed database via ODBC. If you cannot connect from the ODBC test button, do NOT attempt to connect using the BDE. It's not going to work either, as it depends on ODBC working first.
- Close dBASE and any dBASE applications that you have running. Open the BDE Administrator. You can find it on your Start/Program Files/dBASE Plus menu or in the Control Panel:
Scroll through your list of databases and you should see the ODBC connection name that you created on the previous page. In my case, I created an ODBC connection called mySparky14. ...and there it is! (see below; it's not shown in the list above) The BDE has automatically created an alias for it already. Note: I recall reading on a dBASE newsgroup that using a BDE Alias with the same name as the ODBC name will cause problems. I am going to leave the automatically-created BDE Alias untouched and create a new one with a different name. Doing this has caused some confusion in the past, what with duplicate names and similar names, but we should be used to that sort of stuff by now. If you think that this workaround is stale information, please let me know!- On the BDE Administrator menu, choose Object, New...
- The 'New Database Alias' dialog box appears. Open the dropdown list and choose the mySQL ODBC 3.51 Driver:
Press the 'Okay' button.- The BDE database configuration window opens with some default settings:
- Notice that the connection has been given a default name of 'ODBC3' by the BDE - the name field in the left column has focus so we can enter a meaningful BDE Alias right now.
I'm going to call it 'my14' so I will type that in. Press Enter to save the BDE Alias name. On this screen, you can also see the mySparky14 alias that was automatically created by the BDE - we're not going to use it though, as mentioned above.- On the main settings window (under the 'Definition' tab), we are going to enter the Database Name and the ODBC DSN. The ODBC DSN is whatever you named it on the previous page. In my case, it is 'mySparky14'. We have not actually created a real database on the server but we know that there is one called 'test' - we discovered it when we created the ODBC connection. The completed screen looks like this:
On the menu, select Object, Apply to save your new BDE Alias. Close the BDE Administrator.- You are now prepared to connect to your mySQL database using dBASE.
Prev: Step 2: Installing the mySQL ODBC Driver 3.51
Next: Step 4: Getting to the mySQL data in dBASEThe MySQL Logo is a registered trademark of MySQL AB in the United States, the European Union and other countries.
Problems? Comments? Please contact us.
© ChelseaData.ca Home About