如何使用图表链接到数据库 [英] how to use a chart with linking to database

查看:87
本文介绍了如何使用图表链接到数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好
我想在我的程序中使用一个图表,该图表由CodeProject带来控制,但是在某些方面我遇到问题,因此,如果有人可以提供帮助或有任何想法,这是图表的代码:

hello everybody
i want to use a chart in my programm which i bring it''s control from CodeProject but i face problems in some points , so if anybody can help or have any idea, this is code of chart:

			string[] labels = new string[iNbProduits];
			PointPairList list1 = new PointPairList();
			double[] y = new double[iNbProduits];
			//double[] y2 = new double[iNbProduits];
			_bd.Command.CommandText = "SELECT `Nom`, `solde`" +
				"FROM Client";
			_bd.Reader = _bd.Command.ExecuteReader();

// my problem is in this loop:
			for (int i=0; i<iNbProduits; i++) {
			if(_bd.Reader.Read()) {
			labels[i] = _bd.Reader["nom"].ToString();
//			y[i]=double.Parse(_bd.Reader["solde"].ToString());
			y[i]= Math.Sin( (double)_bd.Reader["solde"]);
// here sharpdevelop underlines under (list1.Add(y[i]);) exact under list1 and y !! 
			list1.Add(y[i]);
		//y2[i] = double.Parse(_bd.Reader["prixunitaire"].ToString());
				}//if
			}//for i
			_bd.Reader.Close();


请帮助
谢谢大家
谢谢大家


please help
and thanks everybody
thanks everybody

推荐答案

您需要提供更多有关当前代码遇到的问题,已经尝试过的事情的信息.

您可以在> .NET的灵活图表库下面的论坛上发布消息. [新消息 [ ^ ]链接放在文章末尾.
You need to put more information regarding what problem you are having with current code, what things you have already tried.

You can post a message on forum below A flexible charting library for .NET[^]. It has a new message[^] link at the end of article.


这篇关于如何使用图表链接到数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆