April 2008
Intermediate to advanced
704 pages
17h 49m
English
Problem
You need to set the arguments of a stored procedure or use parameters in a SQL query to improve flexibility.
Solution
Create parameter objects appropriate to the type of command object you intend to execute. Configure the parameter objects' data types, values, and directions and add them to the command object's parameter collection using the DbCommand.Parameters.Add method.
How It Works
All command objects support the use of parameters, so you can do the following:
Set the arguments of stored procedures.
Receive stored procedure return values.
Substitute values into SQL queries at runtime.
All parameter objects inherit the MustInherit System.Data.Common.DbParameter class, which implements ...
Read now
Unlock full access