Crystal Reports 中的未知数据库连接器错误
好吧,我可能只是在问这个问题。但我不知道发生了什么,过去几天我一直在努力解决这个问题。
我有一个水晶报表版本 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果使用存储过程作为数据源,请确保它返回结果集。一旦我添加了“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. :-)
您是否使用最新的 Oracle 数据访问组件?
如何检查您正在使用的版本:
注意:这原本是一条评论,但在关于如何检查 ODAC 版本的 OP 响应后添加为答案
Are you using the latest Oracle Data Access Components?
How to check which version you are using:
Note: This was originally a comment but added as an answer after OP response on how to check for the version of ODAC
这是解决方案:
https://social.msdn.microsoft.com/Forums/vstudio/en-US/d2811b33-2c2c-43d1-af51-9c54e9ad7920/unknown-database-connector-error?forum=wpf
我已经解决了问题,我只需要这些行:
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: