A network-related or instance-specific error occurred while establishing a connection
I am new to ADO.NET using C#.I have made a connection string which consists only the connection string. I am using SQLExpress 2008. connection is not opened.
I got an error showing "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 Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)"
Below is the code:
SqlConnection cn=new SqlConnection("Data Source=\"C:\\Documents and Settings\\12345\\My Documents\\Visual Studio 2008\\Projects\\CustomerDataBase\\CustomerDataBase \\CustomerInfo.sdf\"");
Any help would be appreciated..
Thanks in advance.,
Suresh kumar palleti.
|All times are GMT +5.5. The time now is 23:39.|