Please help me with database connection types in Windows.
Posted
by Hamish Grubijan
on Stack Overflow
See other posts from Stack Overflow
or by Hamish Grubijan
Published on 2010-03-31T21:25:53Z
Indexed on
2010/03/31
21:33 UTC
Read the original article
Hit count: 385
sql-server-2008
|connection-string
Sorry for a badly-phrased question. I have a requirement coming from a non-technical person that I need to make sense of. I am basically told: "Here use 'Driver={SQL Server};Server=SERVERNAME\INSTANCENAME;Database=DATABASENAME;Uid=UNAME;Pwd=PASSWORD;';
and here use Server=SERVERNAME\INSTANCENAME;Database=DATABASENAME;Uid=UNAME;Pwd=PASSWORD;';
.
I am getting no additional help here.
While this seems to miraculously fix a bug, I want to understand what is it that I am changing, so I can leave a proper comment for the next developer, plus I can structure the code and name variables differently, depending on the meaning of the change.
The work revolves around ASP.net, reporting, SQL Server 2008.
Please give me some examples about when you would use one connection string over another. Feel free to edit the question if you can see a way to improve it.
When can you lose a 'Driver={SQL Server};
?
Thank you.
EDIT: SQL Server 2008 is the target database, but other can be used ... or maybe will be used in the future.
© Stack Overflow or respective owner