MSSQL Database Connection String Examples

While this isn't a definitive guide on connection strings, we wanted to give you a few examples of connection strings that may be used. Most of our servers are running MSSQL 2012, although newer servers are probably running MSSQL 2016.

Additionally, the following resources may help you as well - https://www.connectionstrings.com/sql-server-2012/

.NET Framework Data Provider for SQL Server

Standard Security
Server=localhost;Database=myDatabase;User Id=myUsername;Password=myPassword;

Connection to a SQL Server instance
Server=localhost\sqlexpress;Database=myDataBase;User Id=myUsername;Password=myPassword;

Microsoft Access ODBC Driver

Standard Security
Driver={Microsoft Access Driver (*.mdb)};Dbq=C:\mydatabase.mdb;Uid=Admin;Pwd=;

Some additional connection string examples

<add name="strConn" connectionString="Data Source=localhost;Initial Catalog=myDatabase;User ID=myDatabaseUer;Password=myPassword" />

<add name="strConn" connectionString="Data Source=localhost\sqlexpress;Initial Catalog=myDatabase;User ID=myDatabaseUer;Password=myPassword" />

DSN_1 = "Driver={Microsoft Access Driver (*.mdb)};Dbq=C:\HostingSpaces\yourUser\yourDomain.com\data\yourDatabase.mdb;"

If you have any issues getting your application connected to our database server, please don't hesitate to contact support and we'll be happy to take a look.


Looking for reliable Windows hosting with Award Winning Customer Support?
Grab your hosting today with a 20% discount. All plans come with our 60 Money Back Guarantee!

Check out our plans & promotions on our website -- https://www.peopleshost.com/

  • mssql, database connection, databases, connection string, MS SQL
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to Access Your MSSQL Databases Remotely

In order to connect to your databases remotely, you will first need to install Microsoft SQL...

Do you offer Crystal Reports?

Yes, we support most major releases of Crystal Reports on our shared Windows servers. If you...

Remote IIS Manager

You can manage your domain(s) with (with limited functionality) via IIS Manager remotely.More...

Windows Shared Application Pool Limits

Our Windows ASP.NET hosting plans have the following application pool memory limits. Windows...

How to Add a Domain in WebsitePanel

In this article we're going to show you how to add a domain to your Windows hosting account in...