Question : Sql Server Connect string question

My Access 2000 application links to a Sql Server 2000 back end. I use 2 methods of data retrieval. I mainly use ADO to open recordsets. But for Reports I use a DSNless query. I am confused that I have to use a different connect string for each of the 2 methods:

For ADO I use: Provider=SQLOLEDB; Data Source=MyServer
For the DSNLess Query I use: ODBC; Driver = Sql Server; Server=MyServer

I am now in the stuation where I have to dynamically connect to differening databases on the same server. It would have been simpler if I could use a common Connect String for the 2 methods. So am I missing something? Or is there a good reason why I cannot use the same connect striing?

Ian

Answer : Sql Server Connect string question

I suspect it's because if you are using an access database, the objects' recordsources have to come via jet hence the need for an ODBC type connection.  If however you were using an Access project then it would be OLDEDB all the way
Random Solutions  
 
programming4us programming4us