对象‘Refresh'的方法‘IAdodc’失败
我参考的程序如下:(连接的是ACCESS数据库)PrivateSubCommand1_Click()Adodc1.ConnectionString="Provider=M...
我参考的程序如下:(连接的是ACCESS数据库)
Private Sub Command1_Click()
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\zbjxc.mdb;Persist Security Info=False"
Adodc1.RecordSource = "SELECT recordDate as 日期,recordCount as 人次,recordmoney as 金额,recordmember as 会员数 FROM record where recordDate between #" & DTPicker1.Value & "#and #" & DTPicker2.Value & "# order by recordDate "
Adodc1.Refresh
Set MSChart1.DataSource = Adodc1
End Sub
Private Sub Form_Load()
MSChart1.chartType = VtChChartType2dLine
End Sub
而我连接的是SQL SERVER 2000
我把程序改成如下:
Private Sub Command1_Click()
Adodc1.ConnectionString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=Data;Data Source=3835D097476846F"
Adodc1.RecordSource = "SELECT DateTime as 日期,a1 as 一点,a2 as 二点,a3 as 三点 FROM Database2 where DateTime between #" & DTPicker1.Value & "#and #" & DTPicker2.Value & "# order by DateTime "
Adodc1.Refresh
Set MSChart1.DataSource = Adodc1
End Sub
Private Sub Form_Load()
MSChart1.chartType = VtChChartType2dLine
End Sub
运行的时候就会提示:对象‘Refresh'的方法‘IAdodc’失败
是不是我程序改还有哪个地方不对啊,请指教 展开
Private Sub Command1_Click()
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\zbjxc.mdb;Persist Security Info=False"
Adodc1.RecordSource = "SELECT recordDate as 日期,recordCount as 人次,recordmoney as 金额,recordmember as 会员数 FROM record where recordDate between #" & DTPicker1.Value & "#and #" & DTPicker2.Value & "# order by recordDate "
Adodc1.Refresh
Set MSChart1.DataSource = Adodc1
End Sub
Private Sub Form_Load()
MSChart1.chartType = VtChChartType2dLine
End Sub
而我连接的是SQL SERVER 2000
我把程序改成如下:
Private Sub Command1_Click()
Adodc1.ConnectionString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=Data;Data Source=3835D097476846F"
Adodc1.RecordSource = "SELECT DateTime as 日期,a1 as 一点,a2 as 二点,a3 as 三点 FROM Database2 where DateTime between #" & DTPicker1.Value & "#and #" & DTPicker2.Value & "# order by DateTime "
Adodc1.Refresh
Set MSChart1.DataSource = Adodc1
End Sub
Private Sub Form_Load()
MSChart1.chartType = VtChChartType2dLine
End Sub
运行的时候就会提示:对象‘Refresh'的方法‘IAdodc’失败
是不是我程序改还有哪个地方不对啊,请指教 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询