VB+access from子句语法错误 Refresh方法的Iadodc失败 10
PrivateSubForm_Load()'TableName=Form3.Text1.Text'DT1.Value=DateMe.DT1.Format=dtpCusto...
Private Sub Form_Load()
'TableName = Form3.Text1.Text
' DT1.Value = Date
Me.DT1.Format = dtpCustom
Me.DT1.CustomFormat = "yyyy-MM-dd "
'显示时间为年-月-日
Me.DT1.Value = Now
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\db_class.mdb;Persist Security Info=False"
Adodc1.RecordSource = "select * from " & TableName & ""
Adodc1.Refresh '此句出现错误
'Set DataGrid1.DataSource = Adodc1
'DataGrid1.Refresh
End Sub
是怎么回事,调试好久依旧没有效,请高手帮忙指导谢谢.
TableName 是变量 VB连接数据库中的变量表 展开
'TableName = Form3.Text1.Text
' DT1.Value = Date
Me.DT1.Format = dtpCustom
Me.DT1.CustomFormat = "yyyy-MM-dd "
'显示时间为年-月-日
Me.DT1.Value = Now
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\db_class.mdb;Persist Security Info=False"
Adodc1.RecordSource = "select * from " & TableName & ""
Adodc1.Refresh '此句出现错误
'Set DataGrid1.DataSource = Adodc1
'DataGrid1.Refresh
End Sub
是怎么回事,调试好久依旧没有效,请高手帮忙指导谢谢.
TableName 是变量 VB连接数据库中的变量表 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询