本文介绍了来自不同表格的图表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将某个字段绘制成一个数据库中不同表格的图表

这是从1个表格中如何从多个表格中制作出来的?

How to plot a certain field to chart from different tables in one database
This is for from 1 table how to make it from several tables?





Dim tblFields As String = "select par,day_date from table1 where day_date between 2014-01-01 and 2014-01-31 order by day_date"
     Dim conn As New OleDbConnection(MDBConnString)
     Dim oCmd As New OleDbCommand(tblFields, conn)
     Dim oData As New OleDbDataAdapter(tblFields, conn)
     Dim ds As New DataSet
     conn.Open()
 oData.Fill(ds, "table1")
     conn.Close()
 Chart1.DataSource = ds. "table1")
     Dim Series1 As Series = Chart1.Series("Series1")
     Chart1.Series(Series1.Name).XValueMember = "day_date"
     Chart1.Series(Series1.Name).YValueMembers = "par"

推荐答案

这篇关于来自不同表格的图表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-27 18:17