473,394 Members | 1,828 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,394 software developers and data experts.

connecting vs 2005 to remote SQL server 2000

I did a search but could not find an aswer that worked so here it
goes.

I just did an upgrade from 2003 to vs 2005 express. I am using a
remote sql server 2000. I specifically upgrade to make use of the
login control. Everything upgraded fine and the site is working on my
local machine.

It seems that my site is trying to connect to a local database. I need
it to attach to a remote database. I added a connection string to
webconfig as follows

<connectionStrings>

<add name="myconnection"
connectionString="server=sqldatabaselocation.com;u id=###;pwd=###;database=name"
providerName="System.Data.SqlClient"/>
</connectionStrings>

but no change. I then tried to clear the database as I had seen in
other posts. Then I got a machine.config error

<connectionStrings>
<clear />
<add name="myconnection"
connectionString="server=sqldatabaselocation.com;u id=###;pwd=###;database=name"
providerName="System.Data.SqlClient"/>
</connectionStrings>

So how does one connect to a remote sql server 2000 so that it is
recognized in the website admin tool?

Oct 30 '07 #1
3 5717
Your problem is that the connection string it is looking for is the
LocalSqlServer connection string (that's what gets used for membership
and personalization.) Just create a duplicate connection string like
the myconnection connection string that has a name of LocalSqlServer and
you should be ok.

I wrote this up a long time ago, sorry you couldn't find it.
http://www.dmbcllc.com/Articles/WebD...atabase/tabid/
165/Default.aspx

-----Original Message-----
From: Me LK [mailto:kl*****@charter.net]
Posted At: Tuesday, October 30, 2007 2:08 PM
Posted To: microsoft.public.dotnet.framework.aspnet
Conversation: connecting vs 2005 to remote SQL server 2000
Subject: connecting vs 2005 to remote SQL server 2000

I did a search but could not find an aswer that worked so here it
goes.

I just did an upgrade from 2003 to vs 2005 express. I am using a
remote sql server 2000. I specifically upgrade to make use of the
login control. Everything upgraded fine and the site is working on my
local machine.

It seems that my site is trying to connect to a local database. I need
it to attach to a remote database. I added a connection string to
webconfig as follows

<connectionStrings>

<add name="myconnection"
connectionString="server=sqldatabaselocation.com;u id=###;pwd=###;databas
e=name"
providerName="System.Data.SqlClient"/>
</connectionStrings>

but no change. I then tried to clear the database as I had seen in
other posts. Then I got a machine.config error

<connectionStrings>
<clear />
<add name="myconnection"
connectionString="server=sqldatabaselocation.com;u id=###;pwd=###;databas
e=name"
providerName="System.Data.SqlClient"/>
</connectionStrings>

So how does one connect to a remote sql server 2000 so that it is
recognized in the website admin tool?

Oct 30 '07 #2
The first thing you must do is provide a <remove name="LocalSqlServer" />
element because that is pre-defined in the master web.config. This then
leaves you clear to provide your own.

the connection string should look like:

<add name="myconnection"
connectionString="server=machinename;database=data basename;uid=username;pwd=password" providerName="System.Data.SqlClient"/>

-- Peter
Recursion: see Recursion
site: http://www.eggheadcafe.com
unBlog: http://petesbloggerama.blogspot.com
BlogMetaFinder: http://www.blogmetafinder.com

"Me LK" wrote:
I did a search but could not find an aswer that worked so here it
goes.

I just did an upgrade from 2003 to vs 2005 express. I am using a
remote sql server 2000. I specifically upgrade to make use of the
login control. Everything upgraded fine and the site is working on my
local machine.

It seems that my site is trying to connect to a local database. I need
it to attach to a remote database. I added a connection string to
webconfig as follows

<connectionStrings>

<add name="myconnection"
connectionString="server=sqldatabaselocation.com;u id=###;pwd=###;database=name"
providerName="System.Data.SqlClient"/>
</connectionStrings>

but no change. I then tried to clear the database as I had seen in
other posts. Then I got a machine.config error

<connectionStrings>
<clear />
<add name="myconnection"
connectionString="server=sqldatabaselocation.com;u id=###;pwd=###;database=name"
providerName="System.Data.SqlClient"/>
</connectionStrings>

So how does one connect to a remote sql server 2000 so that it is
recognized in the website admin tool?

Oct 30 '07 #3


Thank you very much for your technical thing about connection strings.
*** Sent via Developersdex http://www.developersdex.com ***
Nov 4 '07 #4

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

Similar topics

1
by: davidman73 | last post by:
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...
3
by: Ann Marinas | last post by:
Hi there, I am currently developing an ASP.NET program that connects to a SQL Server 2000 database. I also have SQL Server 2005 Express installed on the same local machine. Prior to...
9
by: RvGrah | last post by:
After much hair-pulling, I've finally found the answer to a problem that many are fighting with, difficulty connecting from Sql 2005 Server Management or VS2005 to a remote Sql Server running Sql...
0
by: acwomble | last post by:
I am working with a database on another system via a ssh tunnel using plink. We have setup an alias the local system for the remote database. I am able to connect and work from within Visual...
10
by: MVChauhan | last post by:
Hi We are planning to move over to SQL Server 2005 in near future. At the moment Website is on a seperate server then the Database. OS for both the server is Window 2003 and currently our data...
3
by: Chris | last post by:
Don't know if there is a simple solution for this one or not. When running SQL server on a machine with 2000 loaded and the complete SQL package I don't have any issues. Now I'm trying to login...
6
by: Todd Brewer | last post by:
Windows Server 2000 ASP.NET 2.0 SQL Server 2000 (on a physically seperate server) I moved an ASP.NET 2.0 application from a development server to production, and am getting the following error:...
2
by: orandov | last post by:
Hi, I am having a problem connecting my .net applications from the application server to the database server. When I run the application from my windows xp (sp2) box it works fine. When I try to...
0
by: Bobby | last post by:
Hi, I'm currently experiencing a problem with ASP.NET 2.0 and SQL Server 2000. I have a web application and a windows service (on the same machine), both which need to connect to a SQL Server...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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...
0
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...
0
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...
0
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...

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.