How to call a Procedure/function in VB? [message #117193] |
Mon, 25 April 2005 12:25 |
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 |
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
|
|
|