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 / September 2007

Tip: Looking for answers? Try searching our database.

How change Connection name for Dataset

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
VB Programmer - 06 Sep 2007 15:24 GMT
Using ASP.NET 2.0

Created DataSet1.xsd.  It's using the Connection "ASPNETDBConnectionString
(Web.config)".  I want to use a different one, LocalSqlServer.  How do I
change it?

I tried to change the Connection/Name property of the adapter to
"LocalSqlServer (Web.config)", but it says "Property value is not valid."

Any ideas?  Thanks!

Here's my connection strings in my web.config...

<connectionStrings>
 <remove name="LocalSqlServer" />
 <add name="LocalSqlServer" connectionString="Data
Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\ASPNETDB.MDF;Integrated
Security=True;User Instance=True"
  providerName="System.Data.SqlClient" />
</connectionStrings>
Cowboy (Gregory A. Beamer) - 06 Sep 2007 20:21 GMT
Open web config and look at teh connection strings portion. If you do not
have one for LocalSqlServer, you will never get anywhere with this approach.

I assume you are using table adapters?

Signature

Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

*************************************************

| Think outside the box!

*************************************************
> Using ASP.NET 2.0
>
[quoted text clipped - 16 lines]
>   providerName="System.Data.SqlClient" />
> </connectionStrings>
VB Programmer - 07 Sep 2007 19:45 GMT
Yes.  I'm using LocalSqlServer throught the web project.  It's in the
web.config and working fine.

I just want to know how I can make DataSet1.xsd use LocalSqlServer.  It
keeps wanted to use the other one.

Thanks.

> Open web config and look at teh connection strings portion. If you do not
> have one for LocalSqlServer, you will never get anywhere with this
[quoted text clipped - 24 lines]
>>   providerName="System.Data.SqlClient" />
>> </connectionStrings>

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.