同样的语句,如果数据库是Access,那么MSchart就可以正常显示图线,但是如果数据库是SQL,就只能显示MSchart控件,没有图线,会不会是语句的错误?
我只知道Access中用#代替SQL中的',其它的就不知道了

解决方案 »

  1.   

    http://search.csdn.net/Expert/topic/1153/1153016.xml?temp=.3993189
    http://search.csdn.net/Expert/topic/1408/1408449.xml?temp=.4124414
      

  2.   

    http://search.csdn.net/Expert/topic/2589/2589176.xml?temp=.4741938
    试试看吧。
      

  3.   

    sql = "select whtime as ÈÕÆÚ,whtempavg as Æ½¾ùζÈ,whhumiavg as Æ½¾ùʪ¶È from wenshidu where whname=" & queryname2 & " order by whday,whtime asc"
     Set rsQuery = gcnLeaguers.Execute(sql)
     
     If (gnIsNetOrNot = 1) Then
     frmgraphshow.Adodc1.ConnectionString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;User ID=" & dataname & ";password=" & pwd & ";Initial Catalog=wenshidu;Data Source= " & servername & " "
     Else
     frmgraphshow.Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & gsCurConnectedMdb & ";Persist Security Info=False"
     End If
     
        frmgraphshow.Adodc1.RecordSource = sql
       frmgraphshow.Adodc1.Refresh
       frmgraphshow.MSChart1.ShowLegend = True
        Set frmgraphshow.MSChart1.DataSource = frmgraphshow.Adodc1有什么问题吗?