在 SQL Server 表中序列化 DataSet 的最快方法

发布于 2025-01-01 08:18:36 字数 275 浏览 3 评论 0原文

我有一个从 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

你对谁都笑 2025-01-08 08:18:36

使用 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.

满身野味 2025-01-08 08:18:36

为什么不在 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?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文