Assign connection string to table adapter from session

My application has already been developed, and now we are going to change the connection string that is stored in the session object (Bcoz Distributed Database Management System (DDBMS))

The problem is here .....

In that application There are so many **ObjectDataSource** which are

initialize using the .XSD file. which is associated with the TableAdapter and in which connection string the TableAdapter is assigned from the Web.Config file. How to change connection string saved in session object?

Thanks in advance.

+1
source share
4 answers

XSD , ConnectionModifier Public. "", "Friend/Internal" (VB/#).

ConnectionModifier ( vs2005)! XSD ( ), .

Connection ( , ), .

+7

, , LinqToSQL ( ).

, , "" , web.config , web.config . "", , - , . .

: . , . TableAdapter, , , .

+1

. , . Connection , , . , , , , .

+1

winforms, . , (clsGlobal), . , , clsGlobal.gstrConnectionString . , . tableadapter .

myTableAdapter.Connection.ConnectionString = clsGlobals.gstrConnectionString;

, .ToString() ta.Connection.ConnectionString.

0

Source: https://habr.com/ru/post/1742980/


All Articles