At design time, you can specify parameter values using the parameter collection editor. To display the parameter collection editor, click on the ellipsis button for the Params or Parameters property in the Object Inspector. If the SQL statement does not contain any parameters, no objects are listed in the collection editor.
When using the Params property (TParam objects), you will want to inspect or modify the following,
The DataType property lists the data type for the parameter's value. For some datasets, this value may be correctly initialized. If the dataset did not deduce the type, DataType is ftUnknown, and you must change it to indicate the type of the parameter value.
The DataType property lists the logical data type for the parameter. In general, these data types conform to server data types. For specific logical type-to-server data type mappings, see the documentation for the data access mechanism (BDE, dbExpress, InterBase).
The ParamType property lists the type of the selected parameter. For queries, this is always ptInput, because queries can only contain input parameters. If the value of ParamType is ptUnknown, change it to ptInput.
The Value property specifies a value for the selected parameter. You can leave Value blank if your application supplies parameter values at runtime.
When using the Parameters property (TParameter objects), you will want to inspect or modify the following:
The DataType property lists the data type for the parameter's value. For some data types, you must provide additional information:
The Attributes property controls the type of values the parameter will accept. Attributes may be set to a combination of psSigned, psNullable, and psLong.
The Value property specifies a value for the selected parameter. You can leave Value blank if your application supplies parameter values at runtime.
Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
|
What do you think about this topic? Send feedback!
|