Problem with ADO and Output Params of Stored Procedures
If anyone can help with this situation, it would be greatly appreciated.
Here is what I am using:
Delphi 5 (With the Latest S.P.)
ADOExpress S.P. 2
SQL Server 2000
MDAC 2.6
The Stored Procedure that I am trying to use has three Parameters to it.
The first one is an input parameter, and the next two are output parameters.
I have two problems dealing with Stored Procedures.
Problem #1: I tried to use TADOStoredProc component to run the stored
procedure and get the two output values. This works great, except if the
stored procedure runs for more than 30 seconds, in which case it times out.
I understand that this is a limitation with the TADOStoredProc, TADOTable,
and TADOQuery since there is no CommandTimeout property to set. That brings
me to the real problem I am having.
Problem #2: After figuring out all of this, I decided to use the
TADOCommand. This solved the timeout issue, but now the problem is I can't
get the values back from the two output parameters that I have. They both
come back with NULL values.
So, what I did next is set up a test scenario so that the stored procedure
would run in under 30 seconds. I took the TADOStoredProc and the
TADOCommand and ran them side-by-side. The TADOStoredProc gave me the values
of the two output parameters and the TADOCommand did not.
I have deducted that it has something to do with the TADOCommand, but I do
not know what or why. Does anyone have an explaination or a fix to my
problem?
Thanks for any help you can give.
Ray Oberg
Senior Developer
The Credit Store
rob...@creditstore.com