Robert Gilland 5 Posted July 3 Can I passing an SQL (select Statement )into a REST Request to a Rest Server , and receive a result in a JSON Dataset? Can I pass an INSERT/UPDATE/DELETE Statement into a Rest Request? Share this post Link to post
haentschman 92 Posted July 4 Hi...😎 how about: TMS XData: Accessing any database with SQL queries via the TMS XData REST server https://www.youtube.com/watch?v=2SCvzw0L27o&ab_channel=tmssoftwareTV Share this post Link to post
Lars Fosdal 1866 Posted July 4 7 hours ago, Robert Gilland said: Can I passing an SQL (select Statement )into a REST Request to a Rest Server , and receive a result in a JSON Dataset? Can I pass an INSERT/UPDATE/DELETE Statement into a Rest Request? Short answer: Yes Long answer: Yes, but don't! It would put your SQL database at risk. Instead, build a proper REST API as - it hides the underlying database - it allows you to change the underlying database operations without changing the client A REST API done right is far more secure and robust. 6 Share this post Link to post
João Antônio Duarte 7 Posted Tuesday at 07:17 PM It's not recommended, but it's entirely possible. I use this concept myself in a project. My configuration looks like this: - Rest server, with an endpoint that receives a SQL statement and parameters to execute or return data. - Client application that contains a “REST Query” component that implements all the SQL execution logic via calls to the REST API. I created this client component by inheriting from a TFDMemTable where I add the returned result and implement the dataset events for searching and inserting. Share this post Link to post