473,586 Members | 2,633 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1313
By default, asp.net 2.0 connects to SQL Express 2005 so it stores this
connectionstrin g in the global web.config file in the
<connectionStri ngs> element. So, that means that your local web.config
file also has this SQL Express 2005 connectionStrin g even though you
can see it since its inherited. If you want to connect to another
database server you must remove this default connectionStrin g and add
it with your own connectionStrin g. So, in your web.coniig do this:

<connectionStri ngs>
<clear /> <!-- this removes the inherited connectionstrin g -->
<add connectionStrin g="[YOUR STRING HERE]" />
</connectionStrin gs>

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
1674
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==?= ) / quoted-printable (e.g.=A2=C8=D8) I wonder how to convert them back to chinese characters...Thanks
0
1473
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
3134
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 Studio fine until I bring up SQL 2000 Query Analyzer or Enterprise Mgr. After that, I cannot bring up SQL 2005 Mgt Studio. It get this message: ...
3
5831
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 computer and when I try to reconnect my VB.NET project to SQL Server 2005, I received a message that states unable to connect. Does anyone have...
4
2273
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 . here is my code . by using OLEDB JET I got the data from Excel to data set , the data is in the data table OleDbConnection strConn = new...
4
6267
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 server from 2005's SSMS using windows authentication mode but fail to connect using SQL authentication. The follwoing message is displayed.
1
1200
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
1719
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 TABLE, like storing IMAGE into DB. I hav searched lots of articles on that but didn't get success.
8
1386
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 connection with sql express what should i do to connect it with sql server 2005 <?xml version="1.0"?> <configuration...
0
8202
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8338
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7959
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8216
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5390
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3837
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3865
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2345
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1180
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.