Initialize dataset/adapters with ConnectionString

  • Thread starter Thread starter Jorge Gutierrez
  • Start date Start date
J

Jorge Gutierrez

I have a dataset with mutiple table adapter that they all connect to the
same SQL Server.
They use the connection string from web.config

Is it possible to initialize the dataset/table adapters with another
connection string without modifing the autogenerated code?

Thanks!
 
I suspect that the TableAdapter connection string is stored in the Settings
which can be accessed programmatically.

--
__________________________________________________________________________
William R. Vaughn
President and Founder Beta V Corporation
Author, Mentor, Dad, Grandpa
Microsoft MVP
(425) 556-9205 (Pacific time)
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
http://betav.com http://betav.com/blog/billva
____________________________________________________________________________________________
 
I have a dataset with mutiple table adapter that they all connect to the
same SQL Server.
They use the connection string from web.config

Is it possible to initialize the dataset/table adapters with another
connection string without modifing the autogenerated code?


Get the connection object from the Table Adapter and change it. If I
remember correctly, that is all you have to do.

Peace and Grace,


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

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

*******************************************
| Think outside the box! |
*******************************************
 
Back
Top