CurrentDB... where is this set? how do you change it?

  • Thread starter Thread starter jonknutsonhome
  • Start date Start date
J

jonknutsonhome

i have a access 2000 app that i need to change sql servers on.

uses odbc connections...

how is the currentDB set? how do you change it?
 
The connection can be set using a connection string or it can be set
using a DSN.

You can determine the connection method by getting the connect string
from one of the linked tables.

In the immediate window of VBA
?CurrentDb().TableDefs("NameofTable").Connect

That will return a string that should show you the connection method.
It will either show a DSN: and the name or it will show the SQL Server Name

As far as changing the connection - you are using a DSN connection
-- Make a copy of your Access application (in case something goes wrong)
-- delete all the linked tables
-- Use the File: Get External Data: Link Tables...
-- Change Files of Type to ODBC
-- Build a new DSN to point to the SQL server and database
-- If the old tables were not named with dbo_ at the beginning, you will
need to rename the links and strip off the dbo_ at the beginning.

'====================================================
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================
 
Back
Top