SQL SAMSON

everything sql

Archive for the ‘connection string’ Category

Importance of the Connection String…

leave a comment »

The Connection String to put it simply: allows you to connect your application front-end to the data store or database back-end. It contains attribute information about the targeted data store or database, for example: the server name, instance name, database name, and connection type to name a few. Without a Connection String all you have is either an interface that may look nice but non functional or a relational database that is ready to work but is just sitting there. The Connection String brings the two together and from there the magic starts to happen.

Developers in general use it on a regular basis. Some use it in the config files, some in the code behind, some in the page or applet using the different dataSource objects. I am a bit biased to SQL Server so I will provide a SQL Server sample…of course!

SQL Server Sample: ConnectionString=Server=ServerName\InstanceName;Database=DataBase;Trusted_Connection=True;

Here is an article that dives deeper into the attributes of the Connection String and the syntax. It is geared towards .NET and SQL Server but it is a good article. It is dated back to 2006 but it is still valid. Educate yourself about .NET SQL Server connection string syntax

Please visit ConnectionStrings.com for more information about connecting to other resources such as: MySQL, Oracle, Excel, Active Directory and so-on.

Written by Samson Loo

August 15, 2008 at 2:03 am

Posted in connection string