View Single Post
Old December 8th, 2010, 12:36 AM
DrPurdum DrPurdum is offline
Friend of Wrox
Points: 1,166, Level: 13
Points: 1,166, Level: 13 Points: 1,166, Level: 13 Points: 1,166, Level: 13
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Sep 2008
Location: Indianapolis, IN, USA.
Posts: 234
Thanks: 0
Thanked 32 Times in 30 Posts
Default ExecuteNonQuery()

It's been almost three years since I wrote that code, but the call to ExecuteNonQuery() is not needed for what the code does. My guess is that I had something in mind for later use in the code, but decided not to put it in and just left the call in. It's not an editor mistake, as my original code had it in there, too. Not sure what I was thinking...

The ExecuteNonQuery() is often used to perform catalog operations or to change the data in a database without using a DataSet by executing UPDATE, INSERT, or DELETE statements. For those operations, the call returns the number of rows affected by the call.

Sorry for the confusion...
Jack Purdum, Ph.D.
Author: Beginning C# 3.0: Introduction to Object Oriented Programming (and 14 other programming texts)
The Following User Says Thank You to DrPurdum For This Useful Post:
comecme (December 16th, 2010)