krumpli01 Programming in Mosaic Aug 23, 2022, 5:51 PM Aug 23, 2022, 5:51 PM

How is it possible to read and write to MySQL database? Can it be done with InternetLib?

Answers 1

Luboš Urban Aug 23, 2022, 5:51 PM

Tecomat systems have no support for a direct access to MySQL database. It is possible to send data to the server using fb_httpRequest from InternetLib (POST method) but on the server side it has to be used a script that will insert records to MySQL database. An example of such communication is shown in the manual for InternetLib, pages 25 - 26.

Vice versa, if you need data from the database in Foxtrot, you should run the script or application that will read necessary data from tables a post them to Foxtrot (to its address and specified port). Then you have to define so called uni channel and Foxtrot can receive messages on this channel. If data will be sent for example in JSON format, you can use JSON file parser or JSON doc parser from JSONLib library to obtain data from the message. An example of such project is a part of Mosaic installation.

Your answer

You have to be signed-in for asking a question. Continue after sign-in.