Creating a Parameterized Stored Procedure

Most advanced stored procedures require one or more parameters. The parameters are then used as part of the SQL statement, usually the WHERE clause. When creating a parameterized stored procedure, Access allows you to specify up to 255 parameters in the parameters list. The stored procedure parameters must be separated by commas and enclosed in parentheses.

The procedure in Hands-On 23-4 creates a stored procedure that allows you to insert a new record into the Shippers table on the fly by supplying the required parameter values. Note that the SQL Data Manipulation Language (DML) INSERT INTO statement is used for adding new records to a table.

0 0

Post a comment