DataSet或DataSet.GetXml()中哪个更大? [英] Which is larger a DataSet or a DataSet.GetXml()?

查看:83
本文介绍了DataSet或DataSet.GetXml()中哪个更大?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我有一个将本地数据库上传到主数据库的应用程序.
我使用Web服务来做到这一点,而我的困境是如何将数据库传递给Web服务.

我想出了一种解决方案,可以通过DataSet.GetXml()传递它,并使用mssql中的sp_xml_prepare文档将其大规模插入主数据库中.
我只是想知道是否将其作为DataSet传递是一个更好的主意.

本地数据库位于MySQL中,而主数据库位于MSSQL中.
而且我在本地计算机上使用Winform应用程序.

请帮帮我.

在此先感谢.

Hi All,

I have an application that will upload the local database to the main database.
I use a web service to do that and my dilemma is that how will I pass the database to the web service.

I come up with a solution to pass it by a DataSet.GetXml() and use the sp_xml_preparedocument in mssql to mass insert it into the main database.

I''m just wondering if passing it as a DataSet would be a better idea.

The local database is in MySQL while the main database is in MSSQL.
And I use a winform application in local machine.

Please help me.

Thanks in Advance.

推荐答案

默认情况下,将DataSet发送到Web服务与发送GetXml数据没有什么不同. DataSet仍将序列化为XML并发送.
By default, sending the DataSet to the webservice is no different than sending the GetXml data. The DataSet will still get seriailized into XML and sent.


如果存储过程将采用DataSet的序列化形式并直接合并,并且速度不是太慢,那么看来一个好方法.其他任何事情都需要编写一些代码.我认为跨网络服务传递数据集将以类似的方式对其进行序列化以进行传输.
If the stored procedure will take a DataSet''s serialised form and merge it directly, and it is not too slow, then that seems a good approach. Anything else will require writing some code. I think passing a DataSet across a web service will serialise it in a similar way anyway for the transfer.


另一种解决方案是将数据库导出为SQL语句,并通过MsSql在数据库中运行这些语句.主数据库:这样,任何列更改也可以反映在主数据库中.
The other solution is to export the database as SQL statements and run those through MsSql in the main DB: that way any column changes could also be reflected in the main DB.


这篇关于DataSet或DataSet.GetXml()中哪个更大?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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