Last post Jan 10, 2014 05:08 AM by Happy Chen - MSFT
Jan 09, 2014 03:46 AM|devpuja|LINK
whenever i tried to make a new database in visual basic 2008 i got an error message:
"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 Interfces, error:26 - Error Locating Server/Instance Specified)"
please tell me how this error be removed
Jan 09, 2014 03:51 AM|amlijupnandanan|LINK
Pls check the connection details
str = "CREATE DATABASE MyDatabase ON PRIMARY " +
"(NAME = MyDatabase_Data, " +
"FILENAME = 'C:\\MyDatabaseData.mdf', " +
"SIZE = 2MB, MAXSIZE = 10MB, FILEGROWTH = 10%) " +
"LOG ON (NAME = MyDatabase_Log, " +
"FILENAME = 'C:\\MyDatabaseLog.ldf', " +
"SIZE = 1MB, " +
"MAXSIZE = 5MB, " +
"FILEGROWTH = 10%)";
follow this links
Jan 09, 2014 04:27 AM|devpuja|LINK
from where i check connection details?
how i check connection detail?
Jan 10, 2014 05:08 AM|Happy Chen - MSFT|LINK
At first, you are able to access to your SqlServer.
And, you need to check out your web.config file and find the node below:
<add name="MyNorthwindConnectionString" connectionString="Data Source=(localdb)\v11.0;Initial Catalog=MyNorthwind;Integrated
Security=True;MultipleActiveResultSets=True;Application Name=EntityFramework" providerName="System.Data.SqlClient" />
<add key="MyNorthwindConnectionString" value="Data Source=(localdb)\v11.0;Initial Catalog=MyNorthwind;Integrated Security=True;MultipleActiveResultSets=True;Application Name=EntityFramework" /> </appSettings>
the two postion above would access to your sql server. if you don't find then in your webconfig, you need to search for SqlConnection on your entire solution, find the code below:
//SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["MyNorthwind"].ConnectionString);
SqlConnection con = new SqlConnection("here is your connectionstring");
you need to make sure that it is correct.
Hope it helps you.