OO4O and Stored function returned value problem
From: Gennady <gennadyb_at_halcosoftware.com>
Date: 2000/07/04
Message-ID: <39623681$0$5560_at_fountain.mindlink.net>#1/1
Set PlSqlStmt = objDataBase.CreateSql("Begin
OraDatabase.Parameters.Remove "diff_count"
Date: 2000/07/04
Message-ID: <39623681$0$5560_at_fountain.mindlink.net>#1/1
Hello,
I created a stored function which returns a number.
When I execute the function as PL/SQL block the returned number is non-zero
value.
But when I tried to call the function from my Visual Basic application using
Oracle Objects for OLE like this:
Dim diff_count as Integer
objDataBase.Parameters.Add "tname", "Mytable", ORAPARM_INPUT objDataBase.Parameters("tname").ServerType = 1 objDataBase.Parameters.Add "diff_count", 3, ORAPARM_OUTPUT objDataBase.Parameters("diff_count").ServerType = 2Set PlSqlStmt = Nothing
Set PlSqlStmt = objDataBase.CreateSql("Begin
:diff_count:=MY_FUNCTION(:tname);end;", 0&) diff_count = objDataBase.Parameters("diff_count").Value OraDatabase.Parameters.Remove "tname"
OraDatabase.Parameters.Remove "diff_count"
In this case MY_FUNCTION returns 0 every time, so diff_count = 0 .
I think something wrong with passing output parameter back from Oracle to vb
application.
Could you give me a hint how to fix the problem?
Thanks,
Gennady
Received on Tue Jul 04 2000 - 00:00:00 CEST