I just started reading this book and I am going through the DbObject Class section in chapter 2. I understand everything except for the last RunProcedure method on page 38. I don't understand why it uses the BuildIntCommand in the following line:
sqlDA.SelectCommand = BuildIntCommand(storedProcNamem, parameters);
I understand the purpose of the BuildIntCommand is to return the value of the store procedure, and I agree this makes sense for the first RunProcedure on page 36-37 that is used to insert, update and delete items in the database.
But I don't understand why they use the BuildIntCommand in this RunProcedure method when it is used to select from the database and fill a DataSet object. Why don't they use the BuildQueryCommand instead? Is this just an error in the book? If not, can someone explain why they use the BuildIntCommand?