Writing to the Database
Apress eBooks · 2006
SummaryWhile a SQL query is at the center of every data operation—SELECT, INSERT, UPDATE, or DELETE—you have many ways to get that SQL query defined and executed, and its results examined. You can do almost anything you like as long as you form the SQL correctly and obey the rules of the database you’ve defined.You shouldn’t regard the examples in these chapters as the dogmatic way to do any one particular task. Their purpose is to present various techniques that you may or may not choose to use in your own pages. Whether you use any one block of code is up to you, but you do at least now know where some code works and where other code doesn’t work.In the next chapter, we’ll move away from writing code to modify the database and see that the GridView (and its siblings the DetailsView and FormView) allows you to write pages that will automatically propagate the changes to the database, provided that you specify the correct INSERT, UDPATE, and DELETE queries.