Visual Studio 2005 Cookbook – Database, Using SQL Parameters
Recipe 13.4. Using SQL Parameters
Problem
You need to insert a lot of records into a table, and you would like to simply replace the new data values in the SQL statement without having to build the SQL statement from scratch each time.
Solution
Attach one or more Parameter objects to the Command object.
Discussion
The following SQL Server example inserts new records Read more »
Visual Studio 2005 Cookbook – Database, Retrieving Results from a Database Query
Recipe 13.3. Retrieving Results from a Database Query
Problem
You’ve issued INSERT, UPDATE, and DELETE statements through a command object, but you need to retrieve some data with a SELECT statement.
Solution
Use a DataReader object to quickly review the results of a SELECT statement.
Discussion
The following code retrieves a Read more »



