Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Site Related Forums
 Article Discussion
 Article: SQL Server Connection String

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2007-11-14 : 07:49:49

Some common and not so common connection strings for the .NET SqlConnection object.  The article includes .NET sample code and some tricks to increase the supportability of your application.




Read SQL Server Connection String

Horninger
Starting Member

1 Post

Posted - 2007-11-14 : 08:36:48
Pretty good article! I especially like the idea of setting the app name. Well done!
Go to Top of Page

jezemine
Master Smack Fu Yak Hacker

2886 Posts

Posted - 2007-11-14 : 08:40:32
no discussion of connection strings is complete without a shoutout to this site:

http://www.connectionstrings.com



elsasoft.org
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-11-14 : 08:42:54
And this http://www.carlprothman.net/Default.aspx?tabid=81



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

dataguru1971
Master Smack Fu Yak Hacker

1464 Posts

Posted - 2007-11-18 : 13:27:16
As an extension to this, I often utilize a Microsoft Data Link(UDL) file to simplify connection strings (or to make changing them not involve any changes to the actual code.

Using with ADO
UDL API






Poor planning on your part does not constitute an emergency on my part.

Go to Top of Page

dataguru1971
Master Smack Fu Yak Hacker

1464 Posts

Posted - 2007-11-18 : 13:30:13
quote:
Originally posted by dataguru1971

As an extension to this(referenced at the connection string link above), I utilize the Microsoft Data Link(UDL) file to simplify connection strings (or to make changing them not involve any changes to the actual code.

Using with ADO
UDL API






Poor planning on your part does not constitute an emergency on my part.







Poor planning on your part does not constitute an emergency on my part.

Go to Top of Page

jezemine
Master Smack Fu Yak Hacker

2886 Posts

Posted - 2007-11-18 : 16:21:19
your links are broken. I think this is the page you meant:

http://msdn2.microsoft.com/en-us/library/e38h511e(VS.71).aspx


elsasoft.org
Go to Top of Page

dataguru1971
Master Smack Fu Yak Hacker

1464 Posts

Posted - 2007-11-18 : 16:31:18
Thanks, link is now fixed..



Poor planning on your part does not constitute an emergency on my part.

Go to Top of Page

quangvo
Starting Member

1 Post

Posted - 2009-01-07 : 02:15:03
excellent site for connection strings and example and all .net programming http://www.connectionstringexamples.com

spirit1: <deleted spammy links>
Go to Top of Page

private.casey
Starting Member

1 Post

Posted - 2009-07-16 : 02:15:01
Yeah good article. Thanks for the links guys. I've been struggling a bit with SQL connection strings, and these are definitely helping.

The man who smiles when things go wrong has thought of someone to blame it on. -Robert Bloch

csjones (www)
Go to Top of Page

thompjs
Starting Member

1 Post

Posted - 2010-10-08 : 16:01:54
Application Name=

does not seem to work, it does not show up in Activity Monitor. I've also tried APP= and that doesn't work either

JST
Go to Top of Page

james.crowley
Starting Member

2 Posts

Posted - 2011-03-10 : 14:32:20
Just thought you might be interested in this online sql connection string generator that lets you select the options you want: http://www.developerfusion.com/tools/sql-connection-string/ (only for SQL Server at the moment)
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2011-03-11 : 04:22:20
Provider is missing the above Developer Fusion wizard.


N 56°04'39.26"
E 12°55'05.63"
Go to Top of Page

james.crowley
Starting Member

2 Posts

Posted - 2011-03-16 : 19:34:09
quote:
Originally posted by Peso

Provider is missing the above Developer Fusion wizard.



hey Peso, what do you mean? It's assuming you're using the SqlConnection object (either directly or via Linq/NHibernate/Entity Framework) so you wouldn't ever need to specify the provider as such? (unless I'm missing something!)

If there is a problem, do let me know and we'll get it fixed. Thanks
Go to Top of Page
   

- Advertisement -