By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,811 Members | 785 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,811 IT Pros & Developers. It's quick & easy.

connecting vs 2005 to remote SQL server 2000

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
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

P: n/a
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

P: n/a


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.