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: