Different connection strings. What to use?

  • Thread starter Thread starter Erik Cruz
  • Start date Start date
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
 
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
 
Back
Top