RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TInternalSQLDataSet.Params Property

Represents the parameters for a query or stored procedure.

Pascal
property Params: TParams;
C++
__property TParams Params;

Params is a collection of TParam objects that represent the parameters of a query or stored procedure specified by the SQL dataset. When you specify a query by setting the CommandText property (or the SQL property in TSQLQuery), the SQL dataset automatically parse the query and fills Params with a TParam object for every parameter in the query. Similarly, when you specify a stored procedure by setting the CommandText property (or the StoredProcName property in TSQLStoredProc), the SQL dataset automatically asks the server for a list of stored procedure parameters and fills Params with a TParam object for every parameter of the stored procedure. 

At design-time, use the Params property editor to access the individual TParam objects. For queries, use this property editor to check the DataType property of each parameter and to assign values to the parameters. For stored procedures, you may need to do more, changing the type or number of parameters if the server does not supply complete information about stored procedure parameters. 

You can also use Params to assign parameter properties in code at runtime.

Note: If you do not assign values to input parameters before opening the dataset, it fetches values from the dataset identified by the DataSource property. However, this only works if the individual TParam objects have the same names as fields in the master dataset.
 

 

ParamCheck 

SQL 

StoredProcName 

CommandText 

TParam 

Value 

DataType 

DataSource 

Configuring TSQL Connection 

Connecting to Databases with TDatabase 

Using TQuery 

Using TSimpleDataSet

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!