Results 1 to 5 of 5
  1. #1
    cradaa is offline Novice
    Windows 2K Access 2003
    Join Date
    May 2011
    Posts
    2

    Connection String

    I have inherited a few Access databases that talk to a SQL database in the
    backend.


    I need to redirect them to the new SQL server, but when I search the Access
    database, I cannot find where it builds the connection string.
    When I hover over the linked tables, it shows a DSN-LESS connection, but
    again, I don't know where to change it.
    FYI, there is a system.mdw associated with the Access Db's

    Any help will be appreciated.
    Thanks.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,895
    Can use LinkedTableManager to change table links. Right click on any table (Access 2007 or 2010, don't remember if this works in 2003) to get the Manager.

    Or VBA code can change table links. I do this so can set links with UNC (Universal Naming Convention) pathing.

    Clarify what you mean by DSN-less, show example of link.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    NoellaG's Avatar
    NoellaG is offline VIP
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Jun 2010
    Location
    Belgium
    Posts
    1,041
    Hi,

    could it be you're working with an .adp project? In this case you can find the connection option somewhere in the File menu (it's been a while since I used 2003, so I don't remember where exactly).
    If you're working with ODBC you can use the linked table manager. If there's no DSN available on yoour system you can create a DSN file using the ODBC data manager you'll find in the administrative tools of the control panel (see attached picture).

    greetings
    NG

  4. #4
    cradaa is offline Novice
    Windows 2K Access 2003
    Join Date
    May 2011
    Posts
    2

    Connection String

    When I look in the project code, there is not code for setting up the actual connection strings.
    If I right click the table that is linked it shows something similar to this...
    ODBC;DRIVER=SQL Server;SERVER=sqldev;DATABASE=Inventory;Trusted_Co nnection=YesBut I don't know where that is coming from. This type of connection does not use the typical Data Source ODBC connection you would setup on the the local server.

  5. #5
    NoellaG's Avatar
    NoellaG is offline VIP
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Jun 2010
    Location
    Belgium
    Posts
    1,041
    Hi,

    sounds as a perfect normal ODBC connection to a SQL server. To redirect them to the new SQL server:

    • open the Linked Table Manager
    • select the tables that have to be relinked
    • Check "Always prompt for new location"
    • In the "Select Data source, choose the DSN (File Data Source or Machine Data Source) that contains the new link info. If there doesn't exist a DSN for the new SQL server, you can create one using the administrative tools of the control panel (see my previous answer)

    That's all, you don't need any code to relink the tables.

    succes
    NG

Please reply to this thread with any new information or opinions.

Similar Threads

  1. DAO Connection
    By Tyork in forum Programming
    Replies: 1
    Last Post: 10-11-2010, 01:35 PM
  2. Close DAP Connection
    By gfultz in forum Access
    Replies: 0
    Last Post: 10-16-2009, 10:11 AM
  3. connection performance
    By DanM in forum Programming
    Replies: 0
    Last Post: 08-24-2008, 08:25 AM
  4. Connection to same DB
    By emilylu3 in forum Access
    Replies: 1
    Last Post: 12-30-2005, 09:59 AM
  5. connection to db
    By emilylu3 in forum Access
    Replies: 2
    Last Post: 12-29-2005, 01:06 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums