In my app_code folder I create a dataset (customer.xsd). The wizard prompts to create or choose a connection string. Now, I have two strings in my web.config file - one for production machine, one for dev machine. In my code, I DIM a New datatable and a tableadapter for my dataset. I then call the getdata() method that the tableadapter wizard created for me. However, I can find no property for connection.
In VS2003 I used to set an application variable in global.asax.vb that determined which string to use based on Context.Server.MachineName. I could then use that app variable to set the connectionstring property. Can't do that here.
Here is example of code:
Dim
dtCustomer As New Customer.CustomerDataTableDim taCustomer As New CustomerTableAdapters.CustomerTableAdapter
dtCustomer = taCustomer.GetData()
Handy. But how can I programatically set my connection

Switching Connection strings
LoadStore
TBrij
chris04920
Hi!
Did you try using this following property
this
.taCustomer.Connection.ConnectionString = yourConnectionString;