9.2. Starting with a Relational Database

A common Web service scenario occurs when you have a relational database and you want to expose some of it to applications over the Web. So you create a Web service with some Web methods that return DataSets. If you are going to allow clients to update your database, you might also create some Web methods that take in a DataSet and use it to update the database. Listing 9.1 shows an example Web method called GetCustomersDataSet that returns a DataSet from the Customers table in the Northwind database.

Listing 9.1. A Web method that returns a DataSet (VBWSBook\Chapter9\CustomerOrders.asmx.vb)
 <WebMethod()> _ Public Function GetCustomersDataSet() As DataSet Dim Sql As String = _ "SELECT CustomerID, CompanyName ...

Get Real World XML Web Services: For VB and VB .NET Developers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.