How change Connection name for Dataset

V

VB Programmer

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>
 
C

Cowboy \(Gregory A. Beamer\)

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?

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

*************************************************
| Think outside the box!
|
*************************************************
 
V

VB Programmer

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top