Crystal Reports 中的未知数据库连接器错误

发布于 2024-10-21 22:04:58 字数 541 浏览 4 评论 0原文

好吧,我可能只是在问这个问题。但我不知道发生了什么,过去几天我一直在努力解决这个问题。

我有一个水晶报表版本 12.2.0.290...我根据 Oracle 连接字符串(不是 ODBC,因为它在使用存储过程作为数据源时给我带来了错误)构建了此报表。不管怎样,所以报告与数据库的连接很好..我能够构建整个报告..我所做的每一个更改都刷新数据等等..一旦我完成..我关闭了水晶报告。当我再次打开报表并尝试刷新数据时,我收到错误“Crystal Reports 中的未知数据库连接器错误”。当我尝试直接从水晶报告或我们为此报告构建的 .NET 包装器运行报告时,我收到此错误。当我从另一台机器运行报告(在 CR 中)时,我也遇到同样的错误。事实上,我只是尝试从该报告连接到任何 Oracle 数据库。

真正奇怪的是,如果我打开我们不久前构建的另一个报告。我可以从中连接到相同的数据源我转到文件 ->打开并打开第一个报告..我可以连接到Oracle数据源并且报告运行良好..我可以随意重现这种奇怪的行为..我不知道发生了什么....并且我一直在盯着这个问题很长时间..如果有人有任何想法,我将非常乐意尝试它们...

谢谢!

Ok, I am probably just shooting air with this question.. but I have no idea what's happening and I have been banging my head against it for the last couple days.

I have a crystal report version 12.2.0.290... I built this report against an Oracle connection string (not ODBC as it was giving me errors to use a stored procedure as a data source). Anyway, so the report was connecting to the database fine.. and I was able to build the entire report.. refreshing data with every change I made etc.. Once I was finished.. I closed the crystal report. When I open the report again and try to refresh the data I get the error "Unknown Database Connector Error in Crystal Reports". I get this error when I try to run the report straight from crystal reports.. or from the .NET wrapper that we built for this report. I also get the same error when I run the report (in CR) from another machine. In fact I get this error just trying to connect to an any Oracle database from that report..

The really strange thing is that if I open another report that we built a while ago.. I can connect to the same exact data source from it and it I go to File -> Open and open the first report.. I can connect to the Oracle data source and the report runs fine.. I can reproduce this strange behavior at will.. I don't know what is going on.... and I have been staring at this problem for the longest while.. if anyone has any ideas I will be more than happy to try them out...

Thanks!!

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

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

发布评论

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

评论(3

忆梦 2024-10-28 22:04:59

如果使用存储过程作为数据源,请确保它返回结果集。一旦我添加了“SELECT * FROM dbo.mytable”,错误就消失了。 :-)

If using a stored procedure as your data source, make sure it RETURNS a RESULT SET. Once I added a 'SELECT * FROM dbo.mytable', the error went away. :-)

愛放△進行李 2024-10-28 22:04:59

您是否使用最新的 Oracle 数据访问组件?

如何检查您正在使用的版本:

  • 在安装 ODAC 期间,请查阅 ODAC 安装程序屏幕。
  • 安装后,请查看 ODAC 安装目录中的 History.html 文件。
  • 在设计时,选择Oracle |关于 IDE 主菜单中的 ODAC。
  • 在运行时,检查 OdacVersion 和 DACVersion 常量的值。

注意:这原本是一条评论,但在关于如何检查 ODAC 版本的 OP 响应后添加为答案

Are you using the latest Oracle Data Access Components?

How to check which version you are using:

  • During installation of ODAC, consult the ODAC Installer screen.
  • After installation, see the history.html file in your ODAC installation directiory.
  • At design-time, select Oracle | About ODAC from the main menu of your IDE.
  • At run-time, check the value of the OdacVersion and DACVersion constants.

Note: This was originally a comment but added as an answer after OP response on how to check for the version of ODAC

筱武穆 2024-10-28 22:04:58

这是解决方案:

https://social.msdn.microsoft.com/Forums/vstudio/en-US/d2811b33-2c2c-43d1-af51-9c54e9ad7920/unknown-database-connector-error?forum=wpf

我已经解决了问题,我只需要这些行:

<startup useLegacyV2RuntimeActivationPolicy="true">
  <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
</startup>

This is The Resolution:

https://social.msdn.microsoft.com/Forums/vstudio/en-US/d2811b33-2c2c-43d1-af51-9c54e9ad7920/unknown-database-connector-error?forum=wpf

I've fixed the problem, I just needed those lines:

<startup useLegacyV2RuntimeActivationPolicy="true">
  <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
</startup>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文