Главная страница | назад





Article #18808: Delphi4, Oracle 7.x stored procedures with multiple parameters with one being a REF Cursor

 Question and Answer Database
FAQ3808B.txt Delphi4, Oracle 7.x stored procedures with multiple parameters with one being a REF Cursor
Category :Database (Oracle)
Platform :Win95/NT
Product : Delphi4.x
Question:
I have a stored procedure on my Oracle 7.x server that has multiple
parameters with one of them being a REF Cursor type. When I try to
execute this procedure I get "invalid cursor" errors.
I used to be able to execute this procedure in Delphi 3, why doesn't
it work in Delphi 4?
Answer:
Parameter binding behavior was changed in Delphi 4.
In Delphi 4 if you don't give a parameter a value it assumes that the
value you wanted was NULL. This causes a problem for the REF Cursor
type in Oracle because the server doesn't accept NULL as an input value
for a REF Cursor type. The workaround for this issue is to set the value
of the REF Cursor parameter to 0 (zero) at either design time or at
runtime before the procedure is executed. This change in behavior will
be accounted for in a later version of the BDE (> 5.0).
3/26/99

Last Modified: 01-SEP-99