SQL Server Connection

J

jim

I have a db in sql server 2000 and front end in access
2000. My tables are linked through odbc with a dsn. My
problem is: Is there anyway by code to program this
connection, because the back end will be on different
servers depending on the location of the install.
 
M

Mary Chipman

Yes -- writing code to link the tables is recommended over using a
dsn, which is very inflexible. You can create a login form for the
users to type in their credentials if you're using SQL logins, or
simply use a trusted connection. You'd create a new DAO TableDef
object and set the Connect property to your connection string, set the
Source table name and append the new TableDef to the TableDefs
collection. Examples of valid ODBC connection strings can be found at
http://www.able-consulting.com/ADO_Conn.htm.

--mary
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top