CHAPTER 21 ADO.NET PART I: THE CONNECTED LAYER
After the stored procedure completes with a call to ExecuteNonQuery(), you can obtain the value of
the output parameter by investigating the command object’s parameter collection and casting
accordingly.
// Return output param.
carPetName = (string)cmd.Parameters["@petName"].Value;
At this point, your initial iteration of the AutoLotDAL.dll data access library is complete! You can use
this assembly to build any sort of front end to display and edit your data (e.g., console based, desktop
GUI, or an HTML-based web application). You have not yet examined how to build graphical user
interfaces, so next you will test your data library from a new console application.
Source Code You can find the AutoLotDAL project under the Chapt