Please help me - execute Stored Procedures with component 
Author Message
 Please help me - execute Stored Procedures with component


Here is a sample code, modify of need be.

You need to use ADODB library.

Dim oRs As New ADODB.Recordset
Dim oCn As New ADODB.Connection
Dim oCm As New ADODB.Command
Dim oPrm As New ADODB.Parameter

With oPrm

        .Direction = adParamInputOutput
        .Size = 30
        .Type = adChar
        .Value = txtBox.Text
End With

 With oCm
        .ActiveConnection = oCn
        .CommandType = adCmdStoredProc
        .CommandText = "NameoftheStoredProcedure"
        .CommandTimeout = 300
        .Parameters.Append oPrm
 End With

Set oRs =oCm.Execute



> Hi!

> I've been struggling to execute a Stored Procedure that
> returns a Scalar Value from a Visual Basic component,
> I've been following the examples in the walkthroughs, the
> online help, MSDN, and a couple of books and it just
> doesn't run.

> In the attached file I've written down a short
> explanation of what I'm doing, please I'll appreciate
> whatever help anyone can give me.

> Thanks.

Sat, 15 Jan 2005 15:35:13 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Help: Executing Stored Procedures against IBM DB2

2. Need Help Executing Stored Procedures

3. Need Help Executing Stored Procedures

4. Help.. Executing Stored procedure from VB5(Beginner)

5. Passing parameters to stored procedures - help please!

6. Output from a stored procedure PLEASE HELP Anyone...

7. Please Help! (VB5 + ODBCdirect + Oracle + Stored Procedures) = YUCK

8. Please help... Report working with SQL stored procedure

9. stored procedure datatime problem - please help

10. Stored procedure error....Please Help!!!

11. Stored Procedure with Parameter Please Help

12. Problems with a stored procedure, please help!!!!


Powered by phpBB® Forum Software