-
Hi,
I'm doing an assignment right now using VB, since the database platform may eventually change, I have to interface Access via ODBC. I need to demonstrate the ability to setup an ODBC connection. Something like a window has to open up and the user can choose any database that he/she wants. After the connection is set up then I'm going to use ADO objects to interact with it. Can anyone please let me know how I can do this, since I've tried many resources and was unsuccessful. Thanks.
-
I don't have any code for you, but you can do this (it's not that complicated)
1. Open a common dialog box (via the API or the Common Dlg Control) and have the user select the MDB file
2. Retrieve the file name from the common dialog, add that into your connection string
3. Open the database with the connection string you built
have fun!
Tom