The next step is to create the web service that you intend to consume. If you are using SQL Server 2000, most of the work is already done for you. If not, then you may need to work with the data that your database returned in order to form it into XML that you can pass back to the client. First, you should create a new web service in your project. Then, the following C# code will return the XML that you need on the client in order to render this SELECT object:
[WebMethod]
public XmlDocument GetSelectObject(string param) {
XmlDocument xmlReturnDocument = new XmlDocument();
using (SqlConnection connMyConnection = new SqlConnection(ConfigurationSettings.AppSettings["ConnectionString"])) {
using (SqlCommand cmdWebServiceProc= new SqlCommand("MyDatabase.dbo.WebServiceProc", connMyConnection)) {