Imports System.Web.Services Imports System.Web.Services.Protocols Imports System.ComponentModel Imports System.Data.SqlClient Imports System.Data ' To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. ' _ _ _ _ Public Class Service1 Inherits System.Web.Services.WebService _ Public Function GetCustomers() As DataSet 'Create sqlconnection & sqldataadapter objects get data from Northwind database Dim conn As SqlConnection = New SqlConnection("Data Source=.;Initial Catalog=Northwind;Integrated Security=True") Dim da As SqlDataAdapter = New SqlDataAdapter("Select * from Customers", conn) Dim ds As DataSet = New DataSet() 'Use the data adapter to fill the data set da.Fill(ds, "Customers") Return ds End Function End Class