473,385 Members | 1,535 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Problem connecting to SQL Server 2000 using VS 2005 (Please help!)

Hello,

I have VS 2005 with SQL Server Express in the same machine, but need to
connect to a remote SQL Server 2000. I'm getting this 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)

I thought it was my code, so I put a GridView control in a blank web
page, started the wizard for a new database connection and finished
setting it up. If I click "Test Query" in the sqldatasource
configuration, it works and returns the rows just as expected. However,
if I run the app, I get the above error again.

I can also access the database with no problem at all using Server
Explorer.

I've been on this for a week now and I'm totally out of resources.

Please, help...

Dec 15 '05 #1
1 1301
By default, asp.net 2.0 connects to SQL Express 2005 so it stores this
connectionstring in the global web.config file in the
<connectionStrings> element. So, that means that your local web.config
file also has this SQL Express 2005 connectionString even though you
can see it since its inherited. If you want to connect to another
database server you must remove this default connectionString and add
it with your own connectionString. So, in your web.coniig do this:

<connectionStrings>
<clear /> <!-- this removes the inherited connectionstring -->
<add connectionString="[YOUR STRING HERE]" />
</connectionStrings>

I hope this solves your issues as you have been stuck for a week

Dec 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: ywchan | last post by:
i use pop3 with .NET to retrieve email it works fine for english only...if the message contains chinese, the chinese characters sometimes display as base64 (e.g. =?big5?B?jkfajfdfjkk==?= ) /...
0
by: Stanley Sin | last post by:
Dear all , How can I remote access SQL server 2000 using vb.net? I don't know how to use ADO.net to remote access database . Any solutions? Thanks in advance. Stanley
2
by: thomas_vicker | last post by:
Hi, I need to maintain both SQL Server 2000 and 2005 on my PC for support purposes. I am using the developer additions. After I install everything (with no install errors) I can use SQL 2005 Mgt...
3
by: leo813 | last post by:
I'm having a difficult time getting my current VB.NET 2003 application to point to my upgraded SQL Server 2005 database. I performed the upgrade from SQL Server 2000 to SQL Server 2005 on my local...
4
by: jayfeb29 | last post by:
Hi , Any one can guide me in Import the Excel 2002 data into sql server 2000 using ado.net1.1. I have searched all the forums most of the solutions end with a line of suggestion not with any code...
4
by: Taw | last post by:
Hi, I have installed SQL 2005 in my PC and am trying to connect to SQL Server 2000 installed in a different machine. Both the server are installed in mixed mode. I can connect to the 2000...
1
by: haries.ahmad | last post by:
Hi all.. i'm newbie in aspnet. i kind a confuse which one should i use for my database system. SQL 2000 or 2005, and what is the different. thankyou
0
by: Bhavesh | last post by:
Hello genious people, I m trying to insert a LARGE text from Multiline Textbox into my table of sqlserver2000. I m using vs-2005. Please note that I dont want to store blob data From FILE TO...
8
by: kkshansid | last post by:
i m from asp background i m very new to asp.net n i m confused with connections in asp.net i have a project in asp.net for practice its web.config file which i think is a connection file has...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.