Everytime I call rdbOpen I get an error message.
Code: Select all
WCCOAui (1), 2016.08.03 10:23:38.103, CTRL, SEVERE, 176, Uncaught exception in thread started at main:
WCCOAui (1), 2016.08.03 10:23:38.103, CTRL, SEVERE, 72, Function not defined,
Module: _QuickTest_
Panel: C:\\WinCC_OA_Proj\\MESLite\\panels\\SQL Testing.pnl []
Object: 1 named: "btnQuery" of type: PUSH_BUTTON
Script: Clicked
Library: C:\\WinCC_OA_Proj\\MESLite\\scripts\\libs\\rdb.ctl
Line: 75, dbOpenConnection
Stacktrace:
1: rdbOpen(dbConnection & c = , string rdb = "") at rdb.ctl:75
2: updateTable() at [Module: _QuickTest_ Panel: SQL Testing.pnl ScopeLib: SQL Testing.pnl]:17
3: main() at [Module: _QuickTest_ Panel: SQL Testing.pnl Object: btnQuery Script: Clicked]:6
Code: Select all
#uses "rdb.ctl"
// called from a button on the screen
updateTable()
{
dbConnection db;
dyn_dyn_anytype result;
string sqlQuery = "SELECT * FROM wincc.dbo.statusCodes";
// Open db connection
rdbOpen(db);
// query the database
rdbSelect(db, sqlQuery, result);
//DebugN(result);
// Close db connection
rdbClose(db);
}