Use of TUniConnection.ExecSQL result
Posted: Fri 29 Jan 2010 02:47
Hi,
This is using SQL Server 2008
If possible, how do I get the value returned using TUniConnection.ExecSQL ?
For example:
var
V: Variant;
V := UniConnection1.ExecSQL('SELECT COUNT(*) AS TOTAL_RECS FROM MY_TABLE', []);
V is always Null.
How do I get at the Result parameter mentioned in help?
ParamByName('Result') raises an exception since it doesn't exist but how do I specify an output parameter called RESULT in the above example query?
Thanks in advance.
Regards, Paul.
This is using SQL Server 2008
If possible, how do I get the value returned using TUniConnection.ExecSQL ?
For example:
var
V: Variant;
V := UniConnection1.ExecSQL('SELECT COUNT(*) AS TOTAL_RECS FROM MY_TABLE', []);
V is always Null.
How do I get at the Result parameter mentioned in help?
ParamByName('Result') raises an exception since it doesn't exist but how do I specify an output parameter called RESULT in the above example query?
Thanks in advance.
Regards, Paul.