VB查询ACCESS数据库问题
在查询按钮出我编了如下PrivateSubCommand4_Click()DimaAsIntegera=Text8.TextAdodc1.RecordSource="se...
在查询按钮出我编了如下
Private Sub Command4_Click()
Dim a As Integera = Text8.TextAdodc1.RecordSource = "select * from 表1 where ID=" & aAdodc1.RefreshSet DataGrid1.DataSource = Adodc1
End Sub Private Sub Command5_Click()
Dim b As Stringb = Text9.TextAdodc1.RecordSource = "select * from 表1 where 姓名="" & b & """Adodc1.RefreshSet DataGrid1.DataSource = Adodc1
End Sub
两个按钮,一个查询ID(数字),一个查询姓名(字符),但两个都不能好好运行,都是
Adodc1.Refresh这条语句出问题,ADODC和DATEGREDE这两个控件都连接上了的,是我少写了什么语句还是写错了啊 展开
Private Sub Command4_Click()
Dim a As Integera = Text8.TextAdodc1.RecordSource = "select * from 表1 where ID=" & aAdodc1.RefreshSet DataGrid1.DataSource = Adodc1
End Sub Private Sub Command5_Click()
Dim b As Stringb = Text9.TextAdodc1.RecordSource = "select * from 表1 where 姓名="" & b & """Adodc1.RefreshSet DataGrid1.DataSource = Adodc1
End Sub
两个按钮,一个查询ID(数字),一个查询姓名(字符),但两个都不能好好运行,都是
Adodc1.Refresh这条语句出问题,ADODC和DATEGREDE这两个控件都连接上了的,是我少写了什么语句还是写错了啊 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询