As the web services you create become more complex, they may eventually require the ability to store and retrieve data, such as usernames and passwords or e-commerce transactions. In this chapter, you learned how to integrate ADO.NET databases into your web services. As you learned, ADO.NET provides a library of objects your programs can use to connect to and query a database.
Although the specific databases and how your web services will use the databases will differ, the steps your web services must perform to integrate a web service are the same:
Connect to the database using a Connection object.
Query the database using either a DataReader (for read-only access) or a DataSet object.
Optionally update the database using a DataAdapter object.
End the connection using the Connection object.
Like web services, ADO.NET makes extensive use of XML-based content behind the scenes to organize data. Throughout this book’s remaining chapters, in order to simplify the steps you must perform to build a database, many of the programs will create datasets “on the fly” using XML data entries.
In Chapter 8, you will learn techniques you can perform to control which users can access your web services.