Answered by:
connection string

Question
-
What connection string should I use in order to connect local database (added in project tree))Monday, September 12, 2011 3:12 PM
Answers
-
Hi Haris,
<connectionStrings>
<add name="ConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient" />
</connectionStrings>Just provide the database name as master or create a test database
Regards,
Charan S
Monday, September 12, 2011 3:17 PM -
Hi Haris,
Check the following link for more information on ConnectionString
http://www.connectionstrings.com/sql-server-2008
PS.Shakeer Hussain- Marked as answer by Alan_chen Tuesday, September 27, 2011 6:56 AM
Monday, September 12, 2011 3:52 PM -
-
Hi Haris,
You can use VS Server Explorer --->Add a connection, the Wizard will give your connection String.
Or you can refer this link: http://www.connectionstrings.com/
Have a nice day.
Alan Chen[MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Sunday, September 18, 2011 9:48 AM
All replies
-
Hi Haris,
<connectionStrings>
<add name="ConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient" />
</connectionStrings>Just provide the database name as master or create a test database
Regards,
Charan S
Monday, September 12, 2011 3:17 PM -
Hi Haris,
Check the following link for more information on ConnectionString
http://www.connectionstrings.com/sql-server-2008
PS.Shakeer Hussain- Marked as answer by Alan_chen Tuesday, September 27, 2011 6:56 AM
Monday, September 12, 2011 3:52 PM -
-
Hi Haris,
You can use VS Server Explorer --->Add a connection, the Wizard will give your connection String.
Or you can refer this link: http://www.connectionstrings.com/
Have a nice day.
Alan Chen[MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Sunday, September 18, 2011 9:48 AM