简体   繁体   English

如何使用C#从数据库创建ASP.Net图表控件

[英]How to Create ASP.Net Chart Control from Database using C#

I am working on a web app(Asp.Net) and need to draw a chart which is using data from database. 我正在使用Web应用程序(Asp.Net),需要绘制一个使用数据库中数据的图表。 In debug mode, I can retrieve data from database but when try to add chart 在调试模式下,我可以从数据库中检索数据,但是当尝试添加图表时

chart proporties-> dataSourceId -> SqlDataSource.. connectionstring is ok 图表比例-> dataSourceId-> SqlDataSource .. connectionstring正常

Then I get this 然后我得到这个

The data provide 'FirebirdSql.Data.Firebird.Client' could not be found in the system configuration. 在系统配置中找不到提供“ FirebirdSql.Data.Firebird.Client”的数据。 unable to find the requested .NetFramework Data Provider. 找不到请求的.NetFramework数据提供程序。 it may not be installed. 它可能没有安装。

Why I am getting this and how to fix it? 为什么我得到这个以及如何解决? Thanks. 谢谢。

This is most probably to do with the version of Firebird. 这很可能与Firebird的版本有关。 Check your machine.config file for these lines: 检查您的machine.config文件中的以下行:

Wrong: 错误:

<configSections>
    <section name="FirebirdSql.Data.FirebirdClient" type="System.Data.Common.DbProviderConfigurationHandler, System.Data, Version=2.6.5.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</configSections>

What it should be: 应该是什么:

<configSections>
    <section name="firebirdsql.data.firebirdclient" type="System.Data.Common.DbProviderConfigurationHandler, System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</configSections>

Your machine.config file can be found at these locations (x86 or x64): 您的machine.config文件位于以下位置(x86或x64):

32-bit 32位

x:\Windows\Microsoft.NET\Framework\[version]\config\machine.config

64-bit 64位

x:\Windows\Microsoft.NET\Framework64\[version]\config\machine.config

I think you only need to edit the 32 bit version of the machine.config file as VS 2010 is 32-bit only I believe. 我认为您只需要编辑machine.config文件的32位版本,因为我相信VS 2010仅是32位。

Try these things first and hopefully you'll find a fix! 首先尝试这些事情,希望您会找到解决方法!

EDIT; 编辑; try reinstalling Firebird, download the latest version and uninstall all instances of Firebird from your computer beforehand 尝试重新安装Firebird,下载最新版本并事先从计算机上卸载Firebird的所有实例

http://www.firebirdsql.org/en/net-provider/ http://www.firebirdsql.org/en/net-provider/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM