All Manuals > LispWorks® User Guide and Reference Manual > 45 The SQL Package

set-prepared-statement-variables Function

Summary

Sets the values of the bind variables in a prepared-statement.

Package

sql

Signature

set-prepared-statement-variables prepared-statement values &key database => prepared-statement

Arguments
prepared-statement
values
A list.
database
A database or nil.
Values
prepared-statement
Description

The function set-prepared-statement-variables sets the values of the bind variables in the prepared-statement prepared-statement to the objects in the list given by values. The length of values must equal the number of bind-variables in prepared-statement (that is, the supplied or computed count in prepare-statement). If database is supplied, then prepared-statement is (re)associated with that database.

If database is not supplied and the statement is not associated with a database yet, set-prepared-statement-variables associates it with the default database *default-database*. If the statement was already associated and database is nil, the association does not change.

set-prepared-statement-variables returns the prepared-statement.

In the common situation when you want to set the values and immediately execute or query the prepared statement, you can use one of prepared-statement-set-and-execute, prepared-statement-set-and-execute*, prepared-statement-set-and-query or prepared-statement-set-and-query*.

See also

prepared-statement
prepare-statement
destroy-prepared-statement
prepared-statement-set-and-execute
with-prepared-statement


LispWorks® User Guide and Reference Manual - 01 Dec 2021 19:30:56