Executing commands

Newbie question:

I have added two commands to schema. First is StoredProc in Sql Server, dragged it from connection view to schema.

Another added manually like in pic, it returns count of records grouped daily.

But how i execute these commands? And where goes rows what are returned from command (second command)?

Played with TDALocalCommand and TDARemoteCommand but with no success. Also couldn’t find from docs clear instructions.

Finally found this: https://docs.dataabstract.com/API/Delphi/Classes/TDARemoteCommand/

But this i don’t understand: " To enable the execution of commands from the client, set the AllowExecuteCommands property of your TDataAbstractService to true and ensure that all published Commands in your schema are safe for execution".

I don’t find AllowExecuteCommands property from any component that DA Wizard added to DataModule? Do i need to add manually some component or is property added in code?

Anyway i managed get StoredProc what deletes duplicate rows running. Now still need to find out how to handle command what returns rows?

Check _Impl unit in your server-side project. usually, it is DataService_Impl. it has AllowExecuteCommands property.

in Schema Modeler drap&drop command from connection window to tables node. it will create table that select rows from your command.
See more at the ManagingTables article

Got all working, thanks.

Don’t have server-side project, using Relativity Server. Is it so that with it you don’t need to set AllowExecuteCommands property? Both StoredProcs work.


In Relativity, it is enabled by default. check the Domains and their settings article for details

As a side note:

We are currently working on improving the Command calls API
F.e. for .NET a remote schema command call would look as simple as

dataAdapter.Execute("CommandWithInputParameters","My New Company Name",  "ALFKI");