Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ODBC connection linking to Access 97

Status
Not open for further replies.

redsand

Programmer
Aug 15, 2001
45
US
I have read a lot of previous posts. I am still am not clear on how to link a table in SQL to access without a dsn control panel connection. The sql tables are just for read only and are populating some drop down boxes. Any help would be greatly appreciated.
 
I'm not a SQL Server expert so someone may be able to give better advice, but to the best of my knowledge to use a pass-through query you need a DSN, and obviously you need one to directly link the tables. The only way I can think of to get to it without a DSN would be to use ADO code in the form. Since it's just population items in the Combo-boxes you could put the code on the "OnOpen" event of the form.

Taken from ADO 2.1 Help file:

"A typical connection string for this provider is:

"Provider=SQLOLEDB;Data Source=serverName;Initial Catalog=databaseName; User ID=userName;Password=userPassword;"

"

When I'm doing something similar I create my recordset(s) and make my combo boxes' Row Source Type = Value List and create the Row Source at run time.

Hope this helps, Kyle ::)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top