Go to Top

Stuck on how to connect to a data source?

The other day I needed to connect to my local instance of SQL Server Express 2008, and I wanted to do it without exposing my SQL Server via TCP/IP, (why invite the world to my doorstep if the server is for local use only?).  I was having trouble doing so until I found the right syntax at ConnectionStrings.com:

Data Source=.SQLExpress;Integrated Security=true; AttachDbFilename=|DataDirectory|mydb.mdf;User Instance=true;

ADVERTISING
ACCESS SAFETY AND TRAINING DATABASE

The key for me was using “.SQLExpress” in my connection string. 

The site has a wide range of connection strings for pratically any data source in the planet, head on over and bookmark it, you may never know when it may come in handy!

About Juan Soto

Juan Soto is a Senior Access Developer at IT Impact Inc. and a Microsoft Access MVP. He specializes in Access with SQL Server databases. His passion for Access has led him to helping a wide range of businesses in helping them establish a secure, stable and efficient environment with SQL Server. He’s a frequent speaker at Access user groups nationwide and recently spoke at the Orange County SQL Saturday # 73. If you wish to have Juan speak at your next group meeting you can contact him here.

Leave a Reply

Your email address will not be published. Required fields are marked *

 

Contact Us
[gravityform id="16" title="false" description="false"]