Boolean Result return from Oracle Package.

StrongD1
StrongD1 used Ask the Experts™
on
Can someone tell me which property of VBA ADODB.Command is the return value of an Oracle package?  Our Oracle package returns a true or false depending on whether the insert worked or not.  I am not sure where the result is returned to.  I am assuming in one of the properties...  I noticed when I had it in the debugger that .CommandType in the With state had a value of 1 after the insert.  Is that where the Oracle package returns the result?  

Thanks, here is my code.

Code:

  OraPackageCall = "{call ers.ins_zone({" & iZoneID & ", " & iBuildingID & ", " & iVisitTypeID & ", " & sFinding & ", " _
                & sNarrative & ", " & dDateOfActivity & ", " & iOrgID & ", " & sOrgContact & ", " & sZoneERPAssocName & "})}"
               
  Dim CommandPackage As New ADODB.Command
  Set CommandPackage = New ADODB.Command
 
  With CommandPackage
      .ActiveConnection = strConn
      .CommandText = OraPackageCall
      .CommandType = adCmdText
  End With
 
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2006

Commented:
isnt it type adBoolean

you need to define a command parameter of type adCmdOutput

something like this

cmd.Parameters.Append cmd.CreateParameter("myvariablename", adBoolean, adParamOutput)

Author

Commented:
Is the "myvariablename" the name of my VBA boolean variable?  Or is it the result output from the Oracle package?  

Top Expert 2006
Commented:
it would be the return variable from your stored procedure

I think then you just check the value like this cmd.Parameters("myvariablename")
Should you be charging more for IT Services?

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Top Expert 2006

Commented:

Author

Commented:
Thanks!  This will... the problem I am running into now the Oracle procedure isn't written correctly to return a boolean.  

But this is going to work.   Thanks again.
Top Expert 2006

Commented:
ok, good luck!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial