最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
XML Web Service 数据交换
时间:2008-01-12 编辑:简简单单 来源:一聚教程网
客户端调用服务器端的 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",
-
上一个: 原创的一段通过XML来远程抓娶图片的代码
相关文章
- XMLHTTP实现数据的异步调用 01-12
- C#复制数组的两种方式及效率比较解读 10-24
- ASP.NET Identity用法解析 10-24
- ASP.NET MVC使用Identity增删改查用户介绍 10-24
- C语言中atoi函数模拟实现介绍 10-18
- .Net反向代理组件Yarp用法介绍 10-10