Hello, I would like to read data from a PostgreSQL database from my WinCC OA system. Is it possible ?
If yes, how can I integrate this feature easily ?
PS : Using WinCC OA 3.17 on Windows 10
PostgreSQL
- leoknipp
- Posts:2928
- Joined: Tue Aug 24, 2010 7:28 pm
Re: PostgreSQL
With the functions described in the WinCC OA Documentation --> CONTROL --> Types of functions --> Database functions you can access data from an external database.
E.g. you can use the CTRL function dbOpenConnection() to connect to the database.
For details please have a look at the WinCC OA Documentation.
Best Regards
Leopold Knipp
Senior Support Specialist
E.g. you can use the CTRL function dbOpenConnection() to connect to the database.
For details please have a look at the WinCC OA Documentation.
Best Regards
Leopold Knipp
Senior Support Specialist
- uxout
- Posts:82
- Joined: Wed Jul 20, 2016 12:07 pm
Re: PostgreSQL
So, the best way to do this is to install custom PostgreSQL driver and use DB interface ?
There is no native PostgreSQL driver that I can use within WinCC OA?
There is no native PostgreSQL driver that I can use within WinCC OA?
- gschijndel
- Posts:376
- Joined: Tue Jan 15, 2019 3:12 pm
Re: PostgreSQL
You can use the official PostgreSQL ODBC driver.uxout wrote: ↑ Thu Jan 30, 2020 12:57 pmSo, the best way to do this is to install custom PostgreSQL driver and use DB interface?
More information can be found in the help under: Special functions -> Control-ADO (Access to external databases)
- uxout
- Posts:82
- Joined: Wed Jul 20, 2016 12:07 pm
Re: PostgreSQL
Thanks for all those informations.
One last question : is it possible to force the server to get data from PostgreSQL instead of the client ?
I want to avoid the need to install PostgreSQL driver on all hosts (servers + clients)
One last question : is it possible to force the server to get data from PostgreSQL instead of the client ?
I want to avoid the need to install PostgreSQL driver on all hosts (servers + clients)
- leoknipp
- Posts:2928
- Joined: Tue Aug 24, 2010 7:28 pm
Re: PostgreSQL
On the machine where you want to to connect to the database you have to install the PostgreSQL driver.
If the script is executed in a UI the installation must be made on the computer where the Ui is started.
If you want to make the connection only at the server you need to implement a command / response function between the UI and a CTRL manager running at the server, e.g. via dp elements.
Best Regards
Leopold Knipp
Senior Support Specialist
If the script is executed in a UI the installation must be made on the computer where the Ui is started.
If you want to make the connection only at the server you need to implement a command / response function between the UI and a CTRL manager running at the server, e.g. via dp elements.
Best Regards
Leopold Knipp
Senior Support Specialist