Home » SQL & PL/SQL » SQL & PL/SQL » Is it possible to call a oracle stored procedure Directly using VB Application ?
Is it possible to call a oracle stored procedure Directly using VB Application ? [message #981] Mon, 18 March 2002 04:22 Go to next message
Muralidharan
Messages: 5
Registered: March 2002
Junior Member
sir,

Is it possible to call a oracle stored procedure Directly using VB Application ?
Re: Is it possible to call a oracle stored procedure Directly using VB Application ? [message #982 is a reply to message #981] Mon, 18 March 2002 04:39 Go to previous message
pratap kumar tripathy
Messages: 660
Registered: January 2002
Senior Member
yes it is possible

e.g.

Dim cnn1 As ADODB.Connection
Dim cmdExeproc As ADODB.Command
Set cnn1 = New ADODB.Connection
strCnn = "Provider=OraOLEDB.Oracle;User ID=SCOTT;Password=TIGER;Data Source=ABC.WORLD;"

Dim prm1 As ADODB.Parameter
Dim prm2 As ADODB.Parameter
Dim prm3 As ADODB.Parameter

cnn1.Open strCnn

Set cmdExeproc = New ADODB.Command

cmdExeproc.ActiveConnection = cnn1

cmdExeproc.CommandText = "{call YOUR_PROCEDURE_NAME(?,?,?)}"

Set prm1 = cmdExeproc.CreateParameter("prm1", adSmallInt, adParamInput, , 1)
cmdExeproc.Parameters.Append prm1

Set prm2 = cmdExeproc.CreateParameter("prm2", adSmallInt, adParamInputOutput, , 2)
cmdExeproc.Parameters.Append prm2

Set prm3 = cmdExeproc.CreateParameter("prm3", adSmallInt, adParamOutput)
cmdExeproc.Parameters.Append prm3

cmdExeproc.Execute
cnn1.Close
End Sub
Previous Topic: Is it possible to declare a local variable (not parameter) inside a Stored Procedure ? Urgent
Next Topic: Collection consisting of another collection?
Goto Forum:
  


Current Time: Wed Apr 24 04:02:25 CDT 2024