XML到ODBC [英] XML to ODBC

查看:93
本文介绍了XML到ODBC的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个可以通过发送http帖子''查询'的应用程序,在

返回我得到一个XML文件。


我有另一个只能使用ODBC的应用程序。


我被要求在这两者之间写一个桥。


什么是实现这一目标的最佳方法吗?

I have an application that can be ''queried'' by sending an http post, in
return I get an XML file.

I have another application that can only work with ODBC.

I am asked to write a ''bridge'' between these two.

What would be the best way to achieve this?

推荐答案

您好philip:

您可以使用DataSet实现此目的。

a数据集可以读取和写入数据和模式作为XML文档。

然后,取决于下一步使用ado.net类继续使用

数据集。

我使用ds访问所有ODBC表

搜索数据集类的帮助

祝你好运


" Philip Wagenaar"写道:
Hi philip:
You could achieve this using a DataSet.
a Dataset can read and write data and schema as XML documents.
then, depending on what is next use ado.net classes to continue working with
the dataset.
I access all my ODBC tables using ds
search the help for dataset class
good luck

"Philip Wagenaar" wrote:
我有一个可以通过发送http帖子''查询'的应用程序,
返回我得到一个XML文件。

我被要求在这两者之间写一个桥梁。

什么是最好的方式实现这个目标?
I have an application that can be ''queried'' by sending an http post, in
return I get an XML file.

I have another application that can only work with ODBC.

I am asked to write a ''bridge'' between these two.

What would be the best way to achieve this?



应用程序如何通过odbc访问DataSet?


" raulavi"写道:
How can an application access the DataSet through odbc?

"raulavi" wrote:
您好philip:
您可以使用DataSet实现此目的。
数据集可以读取和写入XML文档的数据和模式。
那么,取决于接下来使用什么ado.net类来继续使用数据集。
我使用ds访问我所有的ODBC表
搜索数据集类的帮助
好运气

Philip Wagenaar写道:
Hi philip:
You could achieve this using a DataSet.
a Dataset can read and write data and schema as XML documents.
then, depending on what is next use ado.net classes to continue working with
the dataset.
I access all my ODBC tables using ds
search the help for dataset class
good luck

"Philip Wagenaar" wrote:
我有一个可以通过发送http帖子''查询'的应用程序,
返回我得到一个XML文件。

我被要求在这两者之间写一个桥梁。

什么是最好的方式实现这个目标?
I have an application that can be ''queried'' by sending an http post, in
return I get an XML file.

I have another application that can only work with ODBC.

I am asked to write a ''bridge'' between these two.

What would be the best way to achieve this?



我使用的函数我传递了我的sql strint参数并返回数据表

Public Function ReturnTbl(ByVal SQLParm As String)As DataTable

Dim cn As New OdbcConnection(CnString)

Dim da As New OdbcDataAdapter(SQLParm,cn)

Dim dt As New DataTable

尝试

da.Fill(dt)

Catch ex As Odbc.OdbcException

''??抛出新的

DataException(MessageBox.Show(ex.ToString& vbLf&""," DataBaseException"))

''用户错误消息msg

MsgBox(SQLParm _

& vbLf& vbLf&""& ex.Message,

MsgBoxStyle.Critical," ; SOSErr")

Catch DBex As DataException

抛出新的DataException(无法检索数据)

结束尝试


返回dt


结束功能
http://msdn.microsoft.com/library/de...xmldataset.asp

" Philip Wagenaar"写道:
I use a function where I pass my sql strint parameter and return the datatable
Public Function ReturnTbl(ByVal SQLParm As String) As DataTable
Dim cn As New OdbcConnection(CnString)
Dim da As New OdbcDataAdapter(SQLParm, cn)
Dim dt As New DataTable
Try
da.Fill(dt)
Catch ex As Odbc.OdbcException
''?? Throw New
DataException(MessageBox.Show(ex.ToString & vbLf & "", "DataBaseException "))
''User error msg
MsgBox(SQLParm _
& vbLf & vbLf & " " & ex.Message,
MsgBoxStyle.Critical, "SOSErr ")
Catch DBex As DataException
Throw New DataException("Unable to retrieve data")
End Try

Return dt

End Function
http://msdn.microsoft.com/library/de...xmldataset.asp
"Philip Wagenaar" wrote:
应用程序如何通过odbc访问DataSet?

" raulavi"写道:
How can an application access the DataSet through odbc?

"raulavi" wrote:
您好philip:
您可以使用DataSet实现此目的。
数据集可以读取和写入XML文档的数据和模式。
那么,取决于接下来使用什么ado.net类来继续使用数据集。
我使用ds访问我所有的ODBC表
搜索数据集类的帮助
好运气

Philip Wagenaar写道:
Hi philip:
You could achieve this using a DataSet.
a Dataset can read and write data and schema as XML documents.
then, depending on what is next use ado.net classes to continue working with
the dataset.
I access all my ODBC tables using ds
search the help for dataset class
good luck

"Philip Wagenaar" wrote:
我有一个可以通过发送http帖子''查询'的应用程序,
返回我得到一个XML文件。

我被要求在这两者之间写一个桥梁。

什么是最好的方式实现这个目标?
I have an application that can be ''queried'' by sending an http post, in
return I get an XML file.

I have another application that can only work with ODBC.

I am asked to write a ''bridge'' between these two.

What would be the best way to achieve this?



这篇关于XML到ODBC的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆