C# strongly typed dataset table adapter not updating connection

338 views Asked by At

In the application I am developing, I used a strongly typed dataset whose table adapters' connection is linked to a connection string saved in the Settings.settings file. At the start of my development, the connection string data source indicated in the Settings file is a local folder in my laptop (e.g. C:\my laptop\my app\database\db.accdb). everything is working fine.

I now want to test the application to the users. We have already placed the database (MS Access to be specific) in the shared drive and I have also updated the settings file's connection string data source to the correct path (e.g. S:\shared drive\the app\database\db.accdb). After building the solution, I send them the exe file ONLY (since from my previous experience, this works).

Now the problem is this: whenever they run the exe file, the adapters are still searching the old connection string (e.g. C:\my laptop\my app\database\db.accdb) instead of the new connection string (e.g. S:\shared drive\the app\database\db.accdb). I have already created a virtual drive in my laptop to simulate the new connection (S:\...) and the app works IN MY LAPTOP regardless of what connection string (old or new) I use.

Things I already tried:

  1. changed the Build Action property of the datasets to compile (which gives errors so I can't build) and to embedded resource but still does not work
  2. changedthe Build Action property of the Settings.settings file to compile (which, not surprisingly, gives errors so I can't build) and to embedded resource but still does not work

What am I missing here? Why is the exe file sent to the users not updating to the new connection string even though I already updated the settings and rebuilt the solution?

0

There are 0 answers