How Do I Configure SQL Server 2005 Backend?

HELP!!! SQL Connection object in VB 2005 not establishing connection with SQL Server 2000 database !!!?

  • I created a DB in SQL Server 2000 and later I attached it with SQL Server 2005 Express. Now, from VB 2005, I am trying to connect to that DB using SQL Connection object. I am correctly setting the Data Source property of SQL Connection object and choosing "Windows Authentication" and browsing for the Data file but as I click the "Test Connection" button it gives me the following error: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings sQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40-Could not open a connection to SQL Server) Please guide me how can i solve this problem. Thanks, Zain.

  • Answer:

    If you are doing .NET work, have you looked in the machine.config to see what your connection string(s) is(are)? Take a look at this example: <connectionStrings> <remove name="LocalSqlServer"/> <add name="MyDatabase" connectionString="data source=sql2k503.datamain.net;Initial Catalog=SQL20005_DB;User ID=Meuser; Password=abcdef" providerName="System.Data.SqlClient" /> </connectionStrings Hope this helps, or at least points you in the right direction.

PuraniJe... at Yahoo! Answers Visit the source

Was this solution helpful to you?

Other answers

Have you looked at the Configuration/Surface Area Config.? And make sure Named Pipes is enabled, as well as Shared Memory. I had this problem for a while. But it sounds like you're trying to connect remotely. If that's the case, you will enable "TCP/IP", and do "Server=*IP*, *Port*" as the connection string instead.

the_dadd_from_tn2005

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.