Accessing the database in .NET usually uses ADO.NET, you can also use Microsoft Data Access Applicaiton Block for.net. If you are accessing the SQL Server database, there is a choice to use Microsoft's SQLXML. This article describes how to use SQLXML's Web Service support.
System Demand - Install .NET Framework 1.1 - Install Microsoft SOAPSDK 2.0, pay attention to it must be 2.0 - Install Microsoft SQLXML 3.0 SP2
System Configuration - Using SQLXML IIS Configuration Tools Create a virtual directory in the default Web site (port number 80), such as MyService - Double-click MyService, select "Local Path" in the "General" property page, the path is used to store WSDL files - Enter the authentication information of the Access Data in the "Security" property page - In the "Data Source" property page, select the SQL Server server you want to access, select the Database Name - On the Settings Properties page, only "Allow POST" - Create a virtual name in the Virtual Name property page, such as "MyTest", type SOAP, the path to the "local path" set in the "General" property page, domain name is your domain name - click "Configure" MyTest In "SOAP Virtual Name Configuration", add your stored procedure. If the stored procedure does not return a dataset, "Output Format" searches "Single Object", if the stored procedure returns a dataset, "Output format" is "single Data set, if the stored procedure returns multiple data sets, "Output Format" is selected "Dataset Object". "Row Format" Select "RAW", check "Return error in SOAP FAULT".
Quote Web Service - In Visual Stadio.NET, use SQLXML automatically generated Web Service with SQLXML. Web service's URL is http: // domain name / virtual directory name / virtual name? WSDL, such as http: // localhost / myService / mytest? WSDL; - After adding a web reference, you can access storage directly through the Web Service interface Process.
Advantages and Disadvantages use SQLXML Web Service to simplify programming, improve development efficiency, and it is also very convenient; developers don't even know objects such as Connection, Command, Adaptor, but more SOAP calls compared to directly using ADO.NET.