Link to home
Start Free TrialLog in
Avatar of yurrea
yurrea

asked on

Using TQuery, get Return code from SQL Server

I'm using Delphi 4.0 and SQL Server 7.0.  The problem is I don't know how to get the return code returned by a stored procedure from SQL Server, using TQuery.

Avatar of ellessar
ellessar

As far as I know, you need to use the TStoredproc object for all stored procedure calls. The return value is stored in the params of the object.

Assuming that you have not tried this: If you want to you can try and do an execsql - using a TQuery - and check the return value, but never having done this, I cannot place any faith in whether this will work...
Avatar of yurrea

ASKER

ellesar:

I'm using TQuery for scalability.  One of the experts told me that for TQuery is more flexible that TStoredProc.  In using TQuery, I use 'open' to get values from my query, and 'execsql' whenever I don't need any feedback from sql server.  However, I'm wondering if I can get the return code from a stored procedure through TQuery.
As far as I know, you need to use the TStoredproc object for all stored procedure calls. The return value is stored in the params of the object.

Assuming that you have not tried this: If you want to you can try and do an execsql - using a TQuery - and check the return value, but never having done this, I cannot place any faith in whether this will work...
ASKER CERTIFIED SOLUTION
Avatar of nitdgrev
nitdgrev

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial