最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
XML Web Service 数据交换
时间:2022-07-02 11:44:53 编辑:袖梨 来源:一聚教程网
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",
客户端调用服务器端的 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",
相关文章
- 《弓箭传说2》新手玩法介绍 01-16
- 《地下城与勇士:起源》断桥烟雨多买多送活动内容一览 01-16
- 《差不多高手》醉拳龙技能特点分享 01-16
- 《鬼谷八荒》毕方尾羽解除限制道具推荐 01-16
- 《地下城与勇士:起源》阿拉德首次迎新春活动内容一览 01-16
- 《差不多高手》情圣技能特点分享 01-16