Ewon Technical Forum

Full Version: How to insert data to SQL database.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi sir, 

I want to insert value from Ewon Flexy to SQL database. Please give me how to do this. 
Thanks you!

Thanks,
Vuong.
Hi Vuong,

There is no built-in solution for doing (We used eSync in the past but it is end-of-life for many years now)

The Ewon can send its data via HTTP(S), MQTT,... and you can create a software to collect them and push them to a DB.
You can also use a solution partner https://www.hms-networks.com/solution-partners (like Pluto https://www.exakom.com/ for example).
(05-09-2022, 02:36 PM)simon Wrote: [ -> ]Hi Vuong,

There is no built-in solution for doing (We used eSync in the past but it is end-of-life for many years now)

The Ewon can send its data via HTTP(S), MQTT,... and you can create a software to collect them and push them to a DB.
You can also use a solution partner https://www.hms-networks.com/solution-partners (like Pluto https://www.exakom.com/ for example).

Hi Simon, 

Thanks for your response. Can I use java to insert data into database by call API? Can you give me document of this way? 
Thanks you very much.

Thanks,
Vuong.
Vuong,

If you have a server that supports Web API call to SQL DB, yes you can use Java or BASIC program to call these API with Ewon data.

See https://developer.ewon.biz/content/ewon-programming
You'll have to use the function "ScheduledActionManager.RequestHttpX()"

Simon
(05-09-2022, 03:41 PM)simon Wrote: [ -> ]Vuong,

If you have a server that supports Web API call to SQL DB, yes you can use Java or BASIC program to call these API with Ewon data.

See https://developer.ewon.biz/content/ewon-programming
You'll have to use the function "ScheduledActionManager.RequestHttpX()"

Simon

Thanks Simon. I will do this way. 
Thanks for your help.

Thanks,
Vuong.
Configure the Ewon Flexy to connect to the SQL database using a suitable communication protocol, such as TCP/IP or company info APIpi. This may involve setting up network connectivity, firewall rules, and authentication credentials.


Also you can try to select an appropriate data transfer mechanism to send data from the Ewon Flexy to the SQL database. Options include:

        1. HTTP POST/PUT requests: Send data in JSON or XML format using HTTP requests.

        2. MQTT messages: Publish data to an MQTT broker that can be subscribed to by the SQL database server.

        3. Direct database connection: Use a driver or library to connect the Ewon Flexy directly to the SQL database and execute INSERT statements.