GetParameterByName()
- Last UpdatedJul 22, 2024
- 1 minute read
Use the GetParameterByName() method to retrieve output or return parameters after the command object has been processed. If the parameter cannot be evaluated, the returned value is null.
You must provide a parameter name.
Syntax
object GetParameterByName(
string ParameterName)
Parameters
ParameterName
Parameter name.
Remarks
It is not considered an error if the ResultSet returned from a query contains no rows. Zero-row results can also be expected as results of queries that contain parameters, so this might be an expected result, depending on the purpose of the query.
Note: Use this method only for parameters defined in a non-OLEDB-type query, as specified by the connection object. If the connection type is not OleDb, null is returned.