Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2003
    South Carolina

    Unanswered: Access not changing to new DSN on next choice.

    I am linking to Visual FoxPro tables from an Access 2000 .mdb using a ODBC connection. 1st problem is I need to change DSN settings based on user input (choice of location of data). I have solved that - creating new DSN name and settings in registry through VBA. This works fine for the first run through. However, when the user chooses a second location, Access creates the new DSN, but the stops cold when I try to open a table, or run any queries with the new tables. I do delete the linked tables and delete the first DSN from the registry before creating the new DSN. So far, the only solution I have found is to run the first connection, close the mdb, reopen mdb, choose second connection, close mdb, etc. Any ideas/suggestions/solutions on how to actually clear the first connection so that Access will allow the second connection?
    Thanks in advance - I've been going nuts on this!

  2. #2
    Join Date
    Sep 2003
    If you're using Access 2000, why did you choose DSN over the adodb connection object? You just need to change your connection strings and won't have to get involved with DSNs
    All code ADO/ADOX unless otherwise specified.

Posting Permissions

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