如何查询 .NET 3.5 (C#) 应用程序?构建自定义 ODBC (OLE DB) 提供程序是最好的方法吗?

发布于 2024-10-03 05:34:31 字数 537 浏览 0 评论 0原文

我用 C# (.NET 3.5) 开发了一个应用程序,它从各种来源收集大量样本数据(例如 40 个通道,每个通道以 400 Hz/32 位采样,持续 24 小时)。样本采用 DateTime/double (x/y) 格式,每个通道可能有数百万个样本。数据存储在 DB4O 文件中。

现在我需要提供一种简单的方法来导出数据。我已经实现了一个简单的 ASCII 文件导出。导出文件很大,但这就是预期的结果。然而,如果能够提供一种通过“查询”应用程序从 Office 2007 等检索数据的简单方法,那就太好了。我正在考虑 (1) Excel 加载项,或 (2) 构建 ODBC 数据提供程序。

构建 Excel 加载项并不难。一些谷歌-fu,你就完成了......

选项#2怎么样?它将允许“任何”应用程序检索用户感兴趣的数据。每个信号可以表示为具有两列(时间和数据)的表格。用户可以使用任何 ODBC 客户端来查询给定的时间跨度,数据将从内部数据源获取并返回到 ODBC 客户端。人们将如何实施这样一个野兽?或者,我在这里缺少其他常见的数据交换机制吗?

谢谢您的宝贵时间!

米凯尔

I've developed an application in C# (.NET 3.5) that collects a lot (e.g. 40 channels, each sampled @ 400 Hz/32 bits per sample for 24 hours) of sample data from various sources. Samples are in the format DateTime/double (x/y) and there may be several million samples per channel. Data are stored in DB4O files.

Now I need to provide an easy way to export data. I've already implemented a simple ASCII file export. Export files are huge, but that's what to expect. However, it would be really nice to provide an easy way to retrieve data from e.g. Office 2007 by "querying" the application. I'm thinking either (1) an Excel add-in, or (2) building an ODBC data provider.

Building an Excel add-in wouldn't be that hard. Some Google-fu and you're done ...

What about option #2? It would enable "any" application to retrieve data the user is interested in. Each signal could be represented as a table with two columns (time and data). The user could use any ODBC-client to query for a given timespan, data would be fetched from the internal data source and returned to the ODBC client. How would one go about implementing such a beast? Or, are there other common data exchange mechanisms I'm missing here.

Thank you for your time!

Mikael

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

红焚 2024-10-10 05:34:31

您可以在实体框架 ORM 堆栈上使用 WCF 数据服务来提供可查询的 ODATA 数据源,可以在本地和整个 Web 上通用使用。特别是 Excels Power Pivot。

整个过程大约需要 15 分钟才能完成。

You can use WCF Data Services on an Entity Framework ORM stack to provide a queriable ODATA Data source can can be consumed generically locally and across the web. Specifically with Excels Power Pivot.

The whole thing should take you about 15 minutes to put together to.

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