Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ADO Connection

0 views
Skip to first unread message

Rio

unread,
Nov 16, 2007, 1:19:06 PM11/16/07
to
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!

boblarson

unread,
Nov 16, 2007, 10:15:00 PM11/16/07
to
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.

Rio

unread,
Nov 17, 2007, 7:50:00 AM11/17/07
to
Yes, my tables are linked. Are there any performance
advantages/disadvantages of using one method vs. the other? Thanks.

boblarson

unread,
Nov 17, 2007, 12:56:00 PM11/17/07
to
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.
0 new messages