Results 1 to 2 of 2

Thread: ODBC

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2000
    Location
    NY
    Posts
    2

    Question

    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.
    G.

  2. #2
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width