CDaoQueryDef::GetParamValue

COleVariant GetParamValue( LPCTSTR lpszName );
throw( CDaoException, CMemoryException );

COleVariant GetParamValue( int nIndex );
throw( CDaoException, CMemoryException );

Return Value

An object of class COleVariant that contains the parameter’s value.

Parameters

lpszName

The name of the parameter whose value you want, for lookup by name.

nIndex

The zero-based index of the parameter in the querydef’s Parameters collection, for lookup by index. You can obtain this value with calls to GetParameterCount and GetParameterInfo.

Remarks

Call this member function to retrieve the current value of the specified parameter stored in the querydef’s Parameters collection. You can access the parameter either by name or by its ordinal position in the collection.

For examples and more information about parameterizing queries, see the article DAO Queries: Filtering and Parameterizing Queries in Visual C++ Programmer's Guide. For related information, see the topic "PARAMETERS Declaration (SQL)" in DAO Help.

CDaoQueryDef OverviewClass MembersHierarchy Chart

See Also   CDaoQueryDef::SetParamValue