Home » SQL & PL/SQL » SQL & PL/SQL » How to call a Procedure/function in VB?
How to call a Procedure/function in VB? [message #117193] Mon, 25 April 2005 12:25 Go to next message
naga_faq
Messages: 17
Registered: April 2005
Location: Pondy
Junior Member

Hello Friends,

Iam in junior level in Oracle. Iam working in VB/Ms-Access. But i was moved in Oracle. So i want to known, how to call PL/SQL procedures/functions in VB forms? is it possible?
And also i need the code for Database connection between VB/Oracle.
Friends, Please reply for my questions.

With Regards
Naga
Re: How to call a Procedure/function in VB? [message #117469 is a reply to message #117193] Wed, 27 April 2005 08:14 Go to previous message
Ramos
Messages: 7
Registered: December 2004
Junior Member
You can run procedures from VB using for example ADO Command

With AdoCommand
.CommandText = "{call yourProc(?,?)}"
.CommandType = adCmdText
.Parameters(0).Value = yourFirstParameter
.Parameters(1).Value = yourSecondParameter
.Execute()
End With

or

With AdoCommand
.CommandText = "{begin;yourProc(?,?);end;}"
.CommandType = adCmdText
.Parameters(0).Value = yourFirstParameter
.Parameters(1).Value = yourSecondParameter
.Execute()
End With



and checking error status after execution..
Bye

Ramos
Previous Topic: number of decimal digits
Next Topic: Trigger when clause
Goto Forum:
  


Current Time: Tue Jun 18 09:12:01 CDT 2024