DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: How do you run stored procedures?

  1. #1
    Big Trev Guest

    How do you run stored procedures?


    I'm new to this can someone help with this.
    Can someone give me some examples of how to run stored procedures or functions
    using ADO & VB against an Oracle database? Thanx!

  2. #2
    Paul Clement Guest

    Re: How do you run stored procedures?

    On 17 Oct 2001 06:20:06 -0700, "Big Trev" <programminginfo@yahoo.com> wrote:

    ¤
    ¤ I'm new to this can someone help with this.
    ¤ Can someone give me some examples of how to run stored procedures or functions
    ¤ using ADO & VB against an Oracle database? Thanx!

    Few different ways to do this. Here is one:

    INFO: Visual Basic Accessing an Oracle Database Using ADO
    http://support.microsoft.com/support.../Q176/9/36.ASP


    Paul ~~~ pclement@ameritech.net
    Microsoft MVP (Visual Basic)

  3. #3
    Ramiro Guest

    Re: How do you run stored procedures?


    Dim CmdConsulta As New ADODB.Command
    Dim PrmConsulta As New ADODB.Parameter
    Dim RsConsulta As New ADODB.Recordset
    ' Define un objeto Command para un procedimiento almacenado.

    Set CmdConsulta.ActiveConnection = CnnMyDatabase CmdConsulta.CommandText
    = "QryInMyDatabase"
    CmdConsulta.CommandType = adCmdStoredProc

    ' Define el parámetro de entrada del procedimiento almacenado.
    **** Esta parte se repite dependiendo de el numero de parametros que
    tenga tu Stored Procedure

    PrmConsulta.Type = adChar 'Tipo Character
    PrmConsulta.Size = 15 'Longitud del parametri
    PrmConsulta.Direction = adParamInput
    PrmConsulta.Value = Valor de Referencia
    CmdConsulta.Parameters.Append PrmConsulta
    **** Hasta aqui


    ' Crea un objeto Recordset al ejecutar el comando.
    Set rsConsulta = CmdConsulta.Execute()


    Paul Clement <UseAdddressAtEndofMessage@swspectrum.com> wrote:
    >On 17 Oct 2001 06:20:06 -0700, "Big Trev" <programminginfo@yahoo.com> wrote:
    >

    >¤ I'm new to this can someone help with this.
    >¤ Can someone give me some examples of how to run stored procedures or functions
    >¤ using ADO & VB against an Oracle database? Thanx!
    >
    >Few different ways to do this. Here is one:
    >
    >INFO: Visual Basic Accessing an Oracle Database Using ADO
    >http://support.microsoft.com/support.../Q176/9/36.ASP
    >
    >
    >Paul ~~~ pclement@ameritech.net
    >Microsoft MVP (Visual Basic)



  4. #4
    Gopala Krishna Kakani Guest

    Re: How do you run stored procedures?


    here i am giving few steps of code for running Stored Procedures..
    but with Sql Server

    cmd.ActiveConnection = con
    cmd.CommandTimeout = 600
    cmd.CommandText = "exec NameOfTheStoredProcedure"
    cmd.Execute

    cmd is command object
    con is connectin object
    and u have to mention Name of the Stored Procedures




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