Database - "Use project default" settings not updated in controls!!

OS: Windows 7x64 / Windows 8.1 x64 (tested with all)
IWS: tested with 7.1 SP3 patch 2 and 7.1 SP3 patch 3 (same problem, not tested with previous versions)

Recently we solved a serious problem that we had with database connections. We were using an OLEDB driver to connect to a SQLServer instance, and we later changed to another driver (SQL native client) using a different IP address for the server.

For the sake of simplicity, let's call connStringOld the first one, and connStringNew the second ond.

Ok, we changed the default Database settings in the project settings window (Database...) as usual. Test connection went ok, all seem to work. We have a project with some Trends saving to database, and data bound controls (like comboboxes) linked to Database views.

Suddenly, we started to see messages like "Cannot connect to Database using connection: connStringNew". Uhm... sounds strange, we double check the connection string, double check the "test connection", etc... all was OK! :crying:

We thought this could be a secondary defect introduced with 7.1 SP3 patch 3, so we reverted to 7.1 SP3 patch 2. The problem was still there. No doubt we executed several "verify all" command with both "delete old ...." check boxes. :crazy:

Finally we found the problem!!!! :w00t: Both the Trends and data bound controls were set to "use project default"... we unselect it, then select it again and... voila! the problem is gone! (later on, we just discovered that opening that dialog and pressing "ok" to close it also repairs it). The error message is broken too, it must say "Cannot connect to Database using connection: connStringOld" instead of connStringNew !!! we would have discovered the problem almost instantly! but the error message is using the connString that must be in use, not the one that is REALLY in use (the bad one, in this case) :mad: :angry:

So, we think these two are serious bugs :angry: that must be fixed ASAP (hopefully in next patch 4 scheduled for second half of December if I recall well from reading the forum): The database layer must use the updated connection string that is set in project default, and last but not least the error message must display the real connection string used, and not the expected one.

If you never change default connection settings, you will never hit this bug. We suspect it has been there hidden for ages...

We can send you a test project if needed, but it is easily reproducible, as you only need a database bound control or a trend with "use project default" setting, run the project (test it is running as expected), then change server IP (for instance) and change project default connection string to reflect the changes, run the project, error.

Best regards :rolleyes:
  • I know this is an OLD post. But I just got this same error.. at least i belive it's the same. I just moved a projekt to a new PC and with new PC name, hance my SQL express connection string also has changed. Even i got OK when testing my connection, then i runtime I stillgot errors that there's no connection to the old database. I cant find any link in any config files or in the setup, where this old string exist's…

    I'm running on the newest version 8.1 SP4.
  • So this is still unfixed? I have not tested it again. :O :mad:

    But anyway, did you follow the workaround and it fixed it for you?

    I mean, going to any control that uses data, deselect "Use project default" and then select it again...
    (yes, it sounds stupid but really it wasn't... maybe it isn't...)

    :crazy:
  • Apparently not.. I’ve been through all controls that have anything related to the DB, but the issue still there..
    been through all files in the Project and search for the old sql connection string, but cannot find I anywhere..

    Any ideas?
  • So just found a grid table that was setup for database with the old PC name.... removed at marked use default database settings... Wola.. it works...


    Indusoft, can this really be true, that this issue have not been fixed for 6 years?