Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / November 2007

Tip: Looking for answers? Try searching our database.

connecting vs 2005 to remote SQL server 2000

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Me LK - 30 Oct 2007 19:08 GMT
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;uid=###;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;uid=###;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?
Dave Bush - 30 Oct 2007 19:24 GMT
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/WebDevelopment/MembershipDatabase/tabid/
165/Default.aspx

-----Original Message-----
From: Me LK [mailto:klkazan@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;uid=###;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;uid=###;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?
Peter Bromberg [C# MVP] - 30 Oct 2007 19:29 GMT
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=databasename;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

> I did a search but could not find an aswer that worked so here it
> goes.
[quoted text clipped - 27 lines]
> So how does one connect to a remote sql server 2000 so that it is
> recognized in the website admin tool?
Sanka Kolitha - 04 Nov 2007 10:34 GMT
Thank you very much for your technical thing about connection strings.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.