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.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.