Link to home
Start Free TrialLog in
Avatar of Share IT
Share ITFlag for Netherlands

asked on

[VB 2013] Tableadapter Connectionstring

I have the following problem:

I have a Visual Studio (VB) 2013 project with a datasource. This datasource contains one table.
The project contains two connection strings(conOne and conTwo). I changed the connectionstring (manually in the properties) of the tableadapter to conTwo.

When I start the program the connectionstring it use always conOne.
In this code, it prints always conOne.
 
Dim tba As New dsTableAdapters.tbaTest
        MsgBox(tba.Connection.Database)
        MsgBox(tba.Connection.ToString)

Open in new window


In the properties of the tableadapter it is connection Two.

Please help me. It is very important for us. We use also VS 2008 at this moment and we don't have this problem in 2008.
Anyone know a solution for this problem?
Avatar of Pavel Celba
Pavel Celba
Flag of Czechia image

Remove the conOne from the project, save the project, rebuild it, and try again. You should see where the conOne was used and then you may replace it by conTwo.
Avatar of Share IT

ASKER

Yes I did that, it works for a small time.

I have another project with the same problem. No I set all the tableadapter connection strings on each page. It's a solution, but not a good solution.
ASKER CERTIFIED SOLUTION
Avatar of Pavel Celba
Pavel Celba
Flag of Czechia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial