UltraLite User's Guide
C++ API Reference
ULResultSet class
virtual bool SetParameter( int argnum, value-reference )
value-reference:
[ unsigned ] long & value
| p_ul_binary value
| unsigned char & value
| ul_char * value
| double & value
| float & value
| [ unsigned ] short & value
| DECL_DATETIME value
| DECL_BIGINT value
| DECL_UNSIGNED_BIGINT value
The following query defines a result set with a parameter:
SELECT id FROM mytable WHERE id < ?
The result set object defined in the C++ API that corresponds to this query has a parameter. You must set the value of the parameter before opening the generated result set object.
argnum An identifier for the argument to be set. The first argument is 1, the second 2, and so on.
value-reference A reference to the parameter value. The data type listing above provides the possibilities. As the parameter are passed as pointers, they must remain valid until used. Do not free them until they are used.
true (1) if successful.
false (0) if unsuccessful. If you supply a parameter of the wrong data type, the method fails.