Click here to Skip to main content
15,915,859 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have a project in vs2013 WPF that this project have a DataBase
BUT
vs2013 give connection string similar
C#
Data Source=(LocalDB)\v11.0;AttachDbFilename=" + AppDomain.CurrentDomain.BaseDirectory.ToString() + "myDB.mdf;Integrated Security=True



but i dont want "LocalDB"
I want an "Express" connection string in vs2013,but How?
On System have: vs2013,SQLSERVER2012,windows8.1
Posted
Comments
PIEBALDconsult 3-Dec-14 10:45am    
http://www.connectionstrings.com/sql-server/

1 solution

sample :
C#
Server=.\SQLExpress;AttachDbFilename=C:\MyFolder\MyDataFile.mdf;Database=dbname;
Trusted_Connection=Yes;

refer: http://www.connectionstrings.com/sql-server-2012/[^]
 
Share this answer
 
Comments
Member 10976155 3-Dec-14 11:21am    
for this connection string give me this error:
Additional information: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL
DamithSL 3-Dec-14 11:30am    
are you sure that sql server instance name is correct?
Member 10976155 26-Dec-14 9:16am    
yes

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900