Set connection string of table adapter dynamically

O

Orit

Hello .

I am stucked with the following problem and hope you can help me :

- My ASP.NET 2.0 application has one master database .
- This master database has a Databases table with list of children
databases .
- All children databases have the same schema ( only the data is
different ) .
My application connects to the Master database first (
connection String of this database should be read from the C:\WINDOWS
\XXX.INI file).
Login web page will present drop-down list of sub-databases ( which
will be
retrieved from the Master database ) and then will connect to
specified sub-database and will display data
from this database in a GridView .
I would like to be able to bind this GridView to the Data Source
Objects , to edit all columns during design time , and to set the
connection string of corresponding table adapter programmatically
during run-time .
How can I do this ?
I found several references to the connection string ( for example ,
via appSettings) , but I got an error message that this is read only
parameter .
Please advice .
Thanks in advance for your help ,
Orit Chanukov .
 

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

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top