communication with Oracle stored procedures


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: communication with Oracle stored procedures

  1. #1
    Join Date
    Apr 2006
    Posts
    9

    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()

  2. #2
    Join Date
    Dec 2003
    Posts
    2,750
    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

  1. VB to Oracle Stored Procedures
    By Dave in forum VB Classic
    Replies: 1
    Last Post: 12-08-2002, 08:37 PM
  2. Calling Stored Procedures of Oracle PL/SQL
    By Narayan in forum VB Classic
    Replies: 6
    Last Post: 06-20-2001, 08:56 AM
  3. Replies: 1
    Last Post: 09-09-2000, 09:40 AM
  4. ADO- Oracle - and Stored Procedures
    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
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center