Different connection strings. What to use?

E

Erik Cruz

Hi.

I have seen ado.net samples using two different connection strings for sql
server:

"data source=local;initial catalog=northwind;integrated security=sspi"

or

"server=(localhost);database=northwind;trusted_connection=true"

I can see that they do the same things, but what are the real differences
between them? Is it recommended to use the former or the later?

TIA,
Erik Cruz
 
R

R.A.

I think that the first uses DSN and the second uses direct SQL server
connection. In the first you have to create the DSN name on the machine, and
on the second you just need to point to the SQL server name. I prefer the
second one.


Regards
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top