ADO Connection

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

When establishing an ADO connection when should I use

Set cn = CurrentProject.Connection

vs

cnn.Open "Provider=sqloledb;" & _
"Data Source=yourServerName;" & _
"Initial Catalog=yourDatabaseName;" & _
"Integrated Security=SSPI"

My app is Access (front-end) and SQL Server (back-end)

Thanks!
 
If your tables are linked then use the CurrentProject.Connection one. If
they are not, you will need to use the other.
--
Bob Larson
Access World Forums Super Moderator
Utter Access VIP
Tutorials at http://www.btabdevelopment.com
__________________________________
If my post was helpful to you, please rate the post.
 
Yes, my tables are linked. Are there any performance
advantages/disadvantages of using one method vs. the other? Thanks.
 
I cannot answer with absolute assuredness but I do believe that the linked
tables will work better for you since a connection is already open and JET
can help in the management of things.
--
Bob Larson
Access World Forums Super Moderator
Utter Access VIP
Tutorials at http://www.btabdevelopment.com
__________________________________
If my post was helpful to you, please rate the post.
 
Back
Top