I have some code like below:
There are 2 items in this tableadapter commandcollection. The regular Fill() and then FINDBYLOGINID(p_loginId).
When I set the connection string on the adapter it's only setting it for the first in the collection. The second in the collection is using the default connection string in the settings file. I would like to override the connection string for the whole commandcollection to the one I pass in which I thought I was doing with adapter.Connection.ConnectionString = p_connectionString;
Any help would be appreciated.
Thanks!
Code:
P_USERSTableAdapter adapter = new P_USERSTableAdapter();
adapter.Connection.ConnectionString = p_connectionString;
P_USERSDataTable table = adapter.FINDBYLOGINID(p_loginId);
There are 2 items in this tableadapter commandcollection. The regular Fill() and then FINDBYLOGINID(p_loginId).
When I set the connection string on the adapter it's only setting it for the first in the collection. The second in the collection is using the default connection string in the settings file. I would like to override the connection string for the whole commandcollection to the one I pass in which I thought I was doing with adapter.Connection.ConnectionString = p_connectionString;
Any help would be appreciated.
Thanks!