Failed to retrieve data from MySQL

This is the main technical forum for discussing problems that were encountered by users while developing PROMOTIC applications, and their possible solutions.

Failed to retrieve data from MySQL

Postby meme » Sat 28. Nov 2015 17:26:25


1) I am able to set up PmDatabase, and successfully show my data by clicking show button, however, i do not know how to retrieve my data from MySQL into PmPanel inside for further, in short, can you please give a proper guideline on how to get data from mysql to pmpanel graphic content?

2) Can i use ViewerData Table panel to show out data from mysql? HOW?

Thanks in advanced!
Posts: 1
Joined: Sat 28. Nov 2015 17:19:53

Re: Failed to retrieve data from MySQL

Postby Kazimierz Heczko » Mon 07. Dec 2015 16:12:57


example for use database in PROMOTIC is included in examples.
You can look into application: <PROMOTIC_DIR>/Examples/Others/AppDB/App_DB.pra
This example works with PmDatabase object, and You can change this data source from Access to MySQL.
In application ther are som buttons, with MySQL don't use "Create" button, it works only with Access or dBase databases, don't work with ODBC databases.
But you can read or delete data from database and if you change data structure accordingly to used in application you can write or edit data in database.
Or you can change application accordingly to your data structure accordingly.
Another example fore use databases in PROMOTIC is in main example accessible from PROMOTIC "Welcome screen" - select "Examples in application" button and run application. In section Database there are some examples, that shows how to work with databases in PROMOTIC.

Hope it helps.
Kazimierz Heczko
Posts: 68
Joined: Thu 13. Dec 2012 9:28:56

Return to I don't know how to...

Who is online

Users browsing this forum: No registered users and 4 guests