The easiest way is to use ADO; for example:
Dim cmd As ADODB.Command
Set cmd = New ADODB.Command
cmd.ActiveConnection = CurrentProject.Connection
cmd.CommandType = adCmdStoredProc
cmd.CommandText = "dbo.MyStoredProcedure"
cmd.Parameters.Append cmd.CreateParameter("@IdLigue", adInteger,
adParamInput, , IdLigue)
cmd.Execute , , adExecuteNoRecords
and here another one, still using the previous Cmd object :
....
cmd.CommandType = adCmdText
cmd.CommandText = "select * from dbo.MyTable where ..."
Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset
rs.CursorLocation = adUseClient
rs.Open cmd, , adOpenStatic, adLockReadOnly
S. L.
> Hello,
>
[quoted text clipped - 3 lines]
> Any help would be greatly appreciated!
> Thanks in advance
If your stored procedure is simple, you may also launch it as a sql
procedure:
docmd.runsql("....")
from queries, select new; design stored procedure. design your procedure.
You may obtain the .... from the icon SQL on the stored procedure design
menu (between icons grid and very sql syntax)
This is ok for simple procedures only.
> Hello,
>
[quoted text clipped - 3 lines]
> Any help would be greatly appreciated!
> Thanks in advance