PDA

Click to See Complete Forum and Search --> : Connecting to SQL Server


Gary.Lowe
Sep 19th, 2000, 05:21 AM
Dear All

I have never used SQL server and need to connect to it and create reports from SQL strings using DAO as it is an old system.

Can anyone provide any code samples of connecting and creating recordsets.

I presume once the connection is established the code is the same as using DAO on an access database, but I am not sure.

Thanks

Ianpbaker
Sep 19th, 2000, 06:33 AM
Hi Gary

The connection string that you are looking for is as follows


ConnectionString = "driver=[SQL Server];uid=admin;server=myserver;database=people"




as for your second question, yes it is mostly the same, apart from some SQL bit's

Hope this helps

Ian

JHausmann
Sep 19th, 2000, 04:03 PM
The only time I've used DAO to get to SQL server is when I've had an Access database with joined tables. The "preferred" method of aceessing a SQL server database is ADO, otherwise RDO or ODBC.