Whether the TXDataset can execute the stored procedure and get the return value or the output parameter value？
TXDataset can execute any SQL statement. The only difference is that a specific component for stored procedures are not provided, so you just need to build the SQL yourself and get the results using FieldByName. It depends on the underlying component you use server-side. For example, if using FireDac, you can execute stored procedures with TFDQuery (and thus with TXDataset):
DECLARE @out varchar(200)
EXEC sp_test ', World', @out OUTPUT
SELECT @out AS OUT
OutValue := XDataset1.FieldByName('OUT').AsString;
Is this also be possible with ElevateDB? I have an stored procedure with parameters in ElevateDB which I would execute similar to the described approach.
Hi Michael, that depends on the specific ElevateDB syntax. Doesn't ElevateDB provide an SQL statement that returns values from stored procedures in a dataset format?
According to information from ElevateDB manual.
You can only retrieve result sets from procedures from a client (TEDBStoredProc).
So it seems it isn't possible.