469,337 Members | 5,972 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,337 developers. It's quick & easy.

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 5525
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Ann Marinas | last post: by
10 posts views Thread by MVChauhan | last post: by
6 posts views Thread by Todd Brewer | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.