Loading

Saturday, March 19, 2011

Sample on how to create and call a stored procedure.


'How to create and call a stored procedure.
Dim conn As ADODB.Connection
Dim rst As ADODB.Recordset

CREATE PROCEDURE ProcEmployees As
Begin
    declare @Empcount as int                     
    Select @EmpCount = count(*) From EmployeesTable
    Return @Empcount
End

Set conn = New ADODB.Connection
Set rst = New ADODB.Recorset

conn.Provider = "Microsoft Jet 4.0 OLE DB Provider"
conn.Open "Data Source=c:\Data1.mdb"
rst = conn.execute "Call ProcEmployees"

SHARE TWEET

Thank you for reading this article Sample on how to create and call a stored procedure. With URL http://x-tutorials.blogspot.com/2011/03/sample-on-how-to-create-and-call-stored.html. Also a time to read the other articles.

0 comments:

Write your comment for this article Sample on how to create and call a stored procedure. above!