Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> input/output parameter: howto get the output from VB6
Hi all
first of all, my apologies if this is off-topic. If so, please tell me where should I post it...
then, my problem
I have a COM+ written in VB6 which has to access an Oracle database
(9.2). I *MUST* use ORAOLEDB provider.
A method in this COM+ dll has to call an Oracle Stored procedure which
has several input parameter, some output parameter and also an
input/output parameter (its type is NUMBER)
The thing is: I can get the output parameter just fine, but I have problems getting the correct value for the IN/OUT param. The stored procedures completes without problems, and it does exactly what it has to do, and it should really return me the correct value of this parameter. I tell this because from PL/SQL I can see with a dbms_output the returned value and it is correct. But when it comes to VB, it gets... truncated!
For example, I know the SP should return 145 (that's what it saves in
the db), but in VB I can only see 14!
Can somebody help me, please?
Here's a sample of the code
PROCEDURE P(P1 IN VARCHAR2, P2 IN NUMBER, ... PN1 OUT NUMBER, PN2 OUT NUMBER, ..., PINOUT INOUT NUMBER) IS ...
and the VB is something like
.ActiveConnection = myORAOLEDBConn
oRS.CursorLocation = adUseClient
oRS.Open oCmd, , adOpenStatic, adLockReadOnly
End With
'read in/out par
myInOutPar = oCmd.Parameters("PINOUT").Value
And instead of receiving 145 I only get 14 ;(
What am I missing?
Thanks in advance
Carlo Received on Thu May 19 2005 - 08:16:36 CDT