【www.gdgbn.com--js教程】

XML Web Service 数据交换
客户端调用服务器端的 Web 服务并传递包含数据的 DataSet (ds):
Private Sub Synchronize()
    Dim username As String = "JohnS"
    Dim blnSuccess As Boolean
    ' 使用 XML Web Service 进行同步
    Cursor.Current = Cursors.WaitCursor
    Dim wsFeedback As New wsFeedback.feedback
    blnSuccess = wsFeedback.InsertFeedback(ds, username)
    Cursor.Current = Cursors.Default
End Sub
服务器端的 Web 服务接受 DataSet 并将 XML 直接传递到 SQL Server 2000 存储的过程中,该过程使用 SQLXML(英文)和 OPENXML 解析 XML 并将新数据插入适当的表格。
 _
Public Function InsertFeedback(ByVal ds As DataSet, ByVal username As 
    String) As Boolean
    Dim con As New SqlConnection(connectionstring)
    Dim cmd As New SqlCommand("p_Feedback_i", con)
    cmd.CommandType = CommandType.StoredProcedure
    ' 设置参数
    Dim prmXML As SqlParameter = cmd.Parameters.Add("@XML", 

本文来源:http://www.gdgbn.com/wangyezhizuo/5039/