在 SQL Server 表中序列化 DataSet 的最快方法
我有一个从 ODBC 数据源 (MySQL) 获取的数据集,我需要临时将其放入 SQL Server DB 中,以便由另一个进程获取(然后进一步转换)。
我不想创建一个格式良好的数据库表,而是希望有一个文本类型的字段并在那里修改内容。
这只是一次数据迁移练习,一次性的,所以我不关心它的优雅、性能或任何其他方面。
我想要的只是能够将“文本 blob”(或二进制)反序列化回类似于数据集的任何内容。 Dictionary 对象也能达到这个目的。
有什么快速解决办法吗? :)
I have a dataset fetched from a ODBC data source (MySQL), I need to temporarily put it into a SQL Server DB to be fetched by another process (and then transformed further).
Instead of creating a nicely formatted database table I'd rather have one field of type text and whack the stuff there.
This is only a data migration exercise, a one-off, so I don't care about elegance, performance, or any other aspects of it.
All I want is to be able to de-serialize the "text-blob" (or binary) back into anything resembling a dataset. A Dictionary object would do the trick too.
Any quick fixes for me? :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
使用 DataSet.WriteXml 写出您的“ text-blob”,然后使用 DataSet.ReadXml之后当您想要将“文本 blob”转换回数据集以执行您想要执行的任何后续操作时。
Use DataSet.WriteXml to write out your "text-blob" then use DataSet.ReadXml later when you want to translate the "text-blob" back into a DataSet to perform whatever subsequent manipulations you want to do.
为什么不在 SSIS 包上完成所有操作,从 MySQL 中提取,根据需要进行转换并在需要的地方加载?
Why don't you do everything on a SSIS package, extract from MySQL, transform as you wish and load wherever you need it?