Page 1 of 1
Read data from SQL Database
Posted: Wed Nov 28, 2018 7:23 am
by aleksandar.postolov
Hi Forum
I want to read some data from a sql database and display the values in a panel (table). No need to store the data in WinCC OA, just display.
How do I do this, any ideas or examples?
Best regards
Aleks
Re: Read data from SQL Database
Posted: Wed Nov 28, 2018 8:23 am
by mkoller
use the CtrlADO CTRL extension, which provides commands to directly read from an external database, e.g. dbOpenConnection(), dbOpenRecordset(), etc.
Re: Read data from SQL Database
Posted: Wed Nov 28, 2018 12:20 pm
by aleksandar.postolov
well, tried it liked described in the manual wit DSN and ODBC (ODBC Driver 13 for SQL Server).Configuration done with c:\\Windows\\SysWOW64\\odbcad32.exe
receiving the following error:
WCCOAUi111:2018.11.28 11:24:02.948[-1]
WCCOAUi111:["Fehlernummer : "][-2147467259]
WCCOAUi111:["Basisfehler : "][0]
WCCOAUi111:["Beschreibung : "]["[Microsoft][ODBC Driver Manager] Der angegebene DSN weist eine nicht übereinstimmende Architektur von Treiber und Anwendung auf."]
WCCOAUi111:["SQL-Fehlertext: "]["IM014"]
If I configure it with the ODBC 64 Bit, it looks fine.