DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2
  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, 07:37 PM
  2. Calling Stored Procedures of Oracle PL/SQL
    By Narayan in forum VB Classic
    Replies: 6
    Last Post: 06-20-2001, 07:56 AM
  3. Replies: 1
    Last Post: 09-09-2000, 08:40 AM
  4. ADO- Oracle - and Stored Procedures
    By John Johnson in forum VB Classic
    Replies: 0
    Last Post: 03-29-2000, 04:40 PM

Bookmarks

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


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links