-
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()
-
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...asp?frame=true
Paul
~~~~
Microsoft MVP (Visual Basic)
Similar Threads
-
By Dave in forum VB Classic
Replies: 1
Last Post: 12-08-2002, 08:37 PM
-
By Narayan in forum VB Classic
Replies: 6
Last Post: 06-20-2001, 07:56 AM
-
By Kundan in forum VB Classic
Replies: 1
Last Post: 09-09-2000, 08:40 AM
-
By John Johnson in forum VB Classic
Replies: 0
Last Post: 03-29-2000, 05:40 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|