Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Access
3rdpartyusrgrp
access
activexcontrol
adp.sqlserver
commandbarsui
conversion
dataaccess.pages
developers.toolkitode
devtoolkits
externaldata
forms
formscoding
gettingstarted
internet
interopoledde
macros
modulescoding
modulesdaovba
modulesdaovba.ado
multiuser
odbcclientsvr
queries
replication
reports
security
setupconfig
tablesdbdesign
  
 
date: Thu, 11 Sep 2008 08:00:09 -0700 (PDT),    group: microsoft.public.access.gettingstarted        back       


CurrentDB... where is this set? how do you change it?   
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?
date: Thu, 11 Sep 2008 08:00:09 -0700 (PDT)   author:   unknown

Re: CurrentDB... where is this 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
'====================================================


jonknutsonhome@yahoo.com wrote:
> 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?
>
date: Thu, 11 Sep 2008 11:39:58 -0400   author:   John Spencer

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us