rdbOpen working in 3.17 but not 3.15

Discussions about product bugs & problems!
Note: This is no replacement for the Official ETM Support!
2 posts • Page 1 of 1
mikek10
Posts:20
Joined: Wed Jun 26, 2019 4:05 pm

rdbOpen working in 3.17 but not 3.15

Post by mikek10 »

Hi,

I have an ODBC DB configured in Windows and can connect to this no problem in WinCC OA 3.17, however using the same code in 3.15 is giving me errors :(

Connection code:
int result;
result = rdbOpen(db, "DSN=MYDB;");


3.17 gives no error and result = 0

This is the error in 3.15:
Module: _QuickTest_
Panel: C:\CustProject\SampleView.pnl [SampleView.pnl]
Script: ScopeLib
Library: C:\Siemens\Automation\WinCC_OA\3.15\scripts\libs\rdb.ctl
Line: 77, wait condition in sink event function call



This is a SQLite3 DB with SQLite3 ODBC Driver 0.9996.00.00



Any idea why 3.15 is giving problems?


EDIT:

With a new 3.15 project the same code works fine and opens the connection. Something about the project must be screwed up, but I don't know what it might be?

mikek10
Posts:20
Joined: Wed Jun 26, 2019 4:05 pm

Re: rdbOpen working in 3.17 but not 3.15

Post by mikek10 »

Believe I have found the cause and a solution to this.

The problem was not actually directly related to rdbOpen but rather in how it was called. I had the following in the ScopeLib of a panel:
SQLite SQLITE = new SQLite();

Where SQLite is a class implementing the SQL functionality I need and the rdbOpen is performed in its constructor. When I did a test in a new 3.15 project I did not follow this method and simply put the rdbOpen call in a panels initialize event which is why it worked.

It seems calling rdbOpen in this way is not a problem in 3.17 but is in 3.15, there is more detail here: https://slowcontrols.wordpress.com/2018 ... -scopelib/

Moving the call of the SQLite constructor to the panels initialize event fixed the problem.

2 posts • Page 1 of 1