Search for another article…

Connection String Examples

A connection string connects your application to your database. In this guide we'll provide some examples you can use! You will need your database credentials for this to work. Log in to your GearHost Account and select your database. Here we provide your Database Server, Name, Username and Password.

ASP Classic


connectstring = "DRIVER={MySQL ODBC 5.3 ANSI Driver};;DATABASE=DBName;UID=DBUser;PWD=myPassword;"


"Driver={SQL Server Native Client 10.0};;Database=DBName;Uid=DBUser;Pwd=myPassword;"



  <add name="AppNameCString" connectionstring="Data;Initial Catalog=DBName;User Id=DBUser;Password=myPassword" providername="MySql.Data.MySqlClient" />


<add name="AppNameCString" connectionString="Data;Initial Catalog=DBName;User ID=DBUser;Password=myPassword" providerName="System.Data.SqlClient" />

Tip: If these connection strings aren't working, you might be using a CMS where it reads the connection strings from a separate file. You can also search for other examples online. Don't have a database? You can create one by following the instructions provided here!

comments powered by Disqus