SQL Server Connection

  • Thread starter Thread starter jim
  • Start date Start date
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.
 
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
 
Back
Top