Update or Insert an Entry from a remote SQL Server via REST API

By: Uli Schauenberg | Asked: 11/03/2023
ForumsCategory: How-toUpdate or Insert an Entry from a remote SQL Server via REST API
Uli Schauenberg asked 6 months ago
Is it at all possible to update or insert an entry from a remote MS SQL Server? The server runs an hourly task that should update the entries on the wordpress site.  I am unclear if this can be somehow achieved with the API Addon or if another approach can be used. If this has already been done I would appreciate some guidance or maybe an example. 
2 Answers
Victor Font answered 6 months ago
Yes, it's possible but the "how" depends on the remote server. If the remote server has an API that returns a JSON RESPONSE, you can pull the content you want provided the remote API has an endpoint that allows you to do so. If the remote system doesn't have an API, you can still use ODBC or some other connection method, but now you've entered the realm of custom code requiring a developer with the skills to accomplish the task.
Uli Schauenberg replied 5 months ago

Thx. Our current setup is actually an ODBC connection that fills wpdatatables. However, we wanted to switch to formidable forms for some reasons and are looking for an easy way to insert and update those forms entries automatically. As formidable does not provide single tables per form but puts this all into the frm_items and frm_item_metas tables we looked at the formidable forms api for a way to achieve this. In the docs we did not find examples so if anybody has already done something similar we would appreciate an example or advice.

Uli Schauenberg answered 5 months ago
All resolved.We kept the ODBC update from the SQL Server to an additional table on the wordpress site. A scheduled stored procedure updates then the frm_items and frm_item_metas tables from this additional table. We would have preferred to do the update by using the api of the formidable forms plugin as this would avoid the tunneling of the ODBC update. But we found the api docs of formidable forms not detailed enough to give this a go without too much trial and error. 

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community