Click here to Skip to main content
15,889,808 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I have one project in C# and my data base is in SQl-Server2008. When I try to connect my database i have one error. Kindly help me to slow this error.
Error: " A Network-related or Instance-Specification error occurred while establishing a connection to SQL Server. The server was not found or was not accessible verify that the instance name is configured to allow remote configured to allow remote connection provider. SQL network interface, Error:26.Error locating Server/Instance specified
:sigh:
Posted
Comments
AmitChoudhary10 10-Nov-10 3:59am    
Run to services.msc and check whether services for SQL are started.May be the problem....
purvi hope 20-Jan-11 7:43am    
Hi all Thanks for replay...
Now I use...
<add name="ConnectionString" providerName="System.Data.SqlClient" connectionString="Persist Security Info=false;Data Source=ADMIN-PC;Initial Catalog=Database;Integrated Security=true" />
It's work very good...
Thanks agen...

Nice little article here[^]. Use this as a checklist.
 
Share this answer
 
Comments
purvi hope 10-Nov-10 3:57am    
Thank you dear. But kindly explain it.
purvi hope 10-Nov-10 4:00am    
Sorry i got it...
Thanks...
purvi hope 10-Nov-10 5:58am    
Dear Abhinav! I read all your content but it is for SQL Server 2005 I need solution for SQL server 2008..
Kindly help me.
Hi! All :),
I try to solve this error by connection string.
<connectionstring>
<add name="ConectionString" provider="" connectionstring="Persist Security Info=false; Data source=MyComputer;Initial catalog=globe;Integrated Sequrity=true" />
</connectionstring>

But now I get Errors : Database schema could not be retrieved for this connection. Please make sure the connection setting are correct and that the database is online. This server version is not supported Only servers up to MicroSoft SQL Server 2005 are supported.
And yes I use SQL server 2008 and Visual Studio 2008.
 
Share this answer
 
v4
Comments
purvi hope 20-Jan-11 7:42am    
Hi all Thanks for replay...
Now I use...
<add name="ConnectionString" providerName="System.Data.SqlClient" connectionString="Persist Security Info=false;Data Source=ADMIN-PC;Initial Catalog=Database;Integrated Security=true" />
It's work very good...
Thanks agen...

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