Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

communication with Oracle stored procedures

I have a stored procedure in Oracle. It accepts two varchar2 parameters and returns a boolean value. I managed to send the parameters using OracleCommand object but I don't know how to retrieve the boolean value.
The ASP.NET code I have is the following:

Dim oraCmdLogin As New OracleClient.OracleCommand("compareLogin", oraConn)
oraCmdLogin.CommandType = CommandType.StoredProcedure

Dim login As New OracleClient.OracleParameter
login.OracleType = OracleClient.OracleType.Number
login.ParameterName = "login"
login.Value = 23
oraCmdLogin.Parameters.Add(login)

Dim pass As New OracleClient.OracleParameter
pass.OracleType = OracleClient.OracleType.Number
pass.ParameterName = "password"
pass.Value = 23
oraCmdLogin.Parameters.Add(pass)

oraConn.Open()

Try
oraCmdLogin.ExecuteNonQuery()

Catch ex As Exception
Response.Write(ex.Message)
End Try
oraConn.Close()
[1138 byte] By [ice-deloff] at [2007-11-11 8:34:49]
# 1 Re: communication with Oracle stored procedures
You should be able to find an example in the below article, however I don't believe that the Oracle PL/SQL boolean data structure maps to standard boolean data type. You may have to return a number instead.

http://msdn.microsoft.com/library/en-us/dnadonet/html/msdnorsps.asp?frame=true
pclement at 2007-11-11 23:13:11 >