O'Reilly logo

Real World XML Web Services: For VB and VB .NET Developers by Yasser Shohoud

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required