Data Directory SQL Server Express Instance in OLEDB

In this article I am going to explain about how to create connection string using data directory SQL server express instance in SQL server native client 10.0 OLE DB provider.
  • 2244

Introduction

Here I am explaining  how to create connection string  using the data directory SQL server express instance in SQL server native client 10.0 OLE DB provider.

Data Directory SQL Server Express Instance

To create connection string using the data directory SQL server express instance in SQL server native client 10.0 OLE DB provider we need to put provider, file name , your database name, set the state of Trusted connection to true.

Syntax:

 Provider=SQLNCLI;Server=.\SQLExpress;AttachDbFilename=|DataDirectory|urdbfile.mdf;Database=dbname;Trusted_Connection=Yes;

Further Readings

You may also want to read these related articles :

Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here

Categories

More Articles

© 2019 DotNetHeaven. All rights reserved.