Page 1 of 1

Failed to retrieve data from MySQL

PostPosted: Sat 28. Nov 2015 17:26:25
by meme
Greeting,

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!

Re: Failed to retrieve data from MySQL

PostPosted: Mon 07. Dec 2015 16:12:57
by Kazimierz Heczko
Hello,

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.