Add custom function similar to the built in API

I was wondering if there was a way to either add custom functions to the built in API? (that currently just lists or deletes company's). Or some other way of doing a call to the same port that the RemoteDBServer is running. The idea is for me to use the current running DBServer to rather than execute some sort or SQL do something else like return a code to the user for initial connection before the database has even been connected. Or do I have to setup another sparkle server on another port to achieve this?

To execute custom functions server-side, you can use TMS XData and its service operations feature:

If your servers are running using the http.sys dispatcher (the default one). you can easily run both RemoteDB and XData server in the same TCP port, just separating them by URL, i.e., you can run RemoteBD on http://myserver/remotedb and XData on http://myserver/xdata.

Thanks that sounds like the way to go however as my requirements are fairly simple and based on what you say about running on the same port with different URLs I wondered if I could just create a simple sparkle server using TAnonymousServerModule, I have tried it, the sparkle server works but it breaks my RemoteDB. Is it possible to do this way?
I noted you saying about the default dispatcher so I added the module using the dispatcher that is used by my remoteDB

Spoke too soon, I was trying to Add config to the end of the current Base URL (http://myserver/remotedb/db1/config) for the new sparkle module but if I use different URL from the first part of the path, as you had shown (http://myserver/config) and add module using the sparkle server rather than the despatcher they both work side by side. Actually better for me to do this and use one config sparkle server then pass the DB name as a parameter.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.