473,854 Members | 1,677 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 1324
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
1684
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
1489
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
3144
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: Package 'Microsoft SQL Management Studio package' failed to load
3
5848
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 an idea on how to do this? I'm fairly new to both programs and inherited the project from someone...
4
2290
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 OleDbConnection ("Provider=Microsoft.Jet.OLEDB.4.0;data source= c:\\1005.xls;Extended...
4
6275
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
1216
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
1732
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
1397
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 xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0"> <appSettings/>
0
9750
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10744
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
10364
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9510
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
7077
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5738
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4550
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
2
4150
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3182
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.