Prysson
asked on
Help overriding tableadapter connection string in c#
I am trying to override the default connection string in a table adapter with a string that gets built using the connectionstringbuilder
SqlConnection c = ConnStrBuilder.BuildConnec tion(orgid );
tvEventLocationsPlusNamesT ableAdapte r tvELNByEventAdapt = new tvEventLocationsPlusNamesT ableAdapte r();
tvELNByEventAdapt.Connecti on = c;
This little snippet is what my current code is but it returns an error because the tvELNByEventAdapt doesnt contain a definition for 'Connection'.
What is the correct way for me to override the default connection string for the table adapter so that its using the correct connection string?
SqlConnection c = ConnStrBuilder.BuildConnec
tvEventLocationsPlusNamesT
tvELNByEventAdapt.Connecti
This little snippet is what my current code is but it returns an error because the tvELNByEventAdapt doesnt contain a definition for 'Connection'.
What is the correct way for me to override the default connection string for the table adapter so that its using the correct connection string?
ASKER
THat just gives me the same error about not containing a definition.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
tvELNByEventAdapt.SelectCo
si,ilarly for inserte, update and delete commands