Check out example codes for "sql stored procedure for access frontend". It will help you in understanding the concepts better.

Code Example 1

Sub spTest()
Dim qdf As DAO.QueryDef, rst As DAO.Recordset
Dim IdValueToProcess As Long

IdValueToProcess = 2  ' test data

Set qdf = CurrentDb.CreateQueryDef("")
qdf.ReturnsRecords = True
qdf.Connect = "ODBC;DSN=myDb;Trusted_Connection=Yes;"
qdf.SQL = "EXEC dbo.getContact " & IdValueToProcess
Set rst = qdf.OpenRecordset(dbOpenSnapshot)

Debug.Print rst!LastName  ' just to make sure we got a result

rst.Close
Set rst = Nothing
qdf.Close
Set qdf = Nothing
End Sub

Code Example 2

CREATE PROCEDURE getContact 
    -- Add the parameters for the stored procedure here
    @id int = 1
AS
BEGIN
    -- SET NOCOUNT ON added to prevent extra result sets from
    -- interfering with SELECT statements.
    SET NOCOUNT ON;

    -- Insert statements for procedure here
    SELECT * FROM myContacts WHERE [email protected]
END

Learn ReactJs, React Native from akashmittal.com