我写了一段程序想在服务器上查找数据,用到了adodc和datagrid控件,但运行时出错,请大虾指点一下
我写了一段程序想在服务器上查找数据,用到了adodc和datagrid控件,但运行时出错,请大虾指点一下PrivateSubForm_Load()WithAdodc1.C...
我写了一段程序想在服务器上查找数据,用到了adodc和datagrid控件,但运行时出错,请大虾指点一下
Private Sub Form_Load()
With Adodc1
.ConnectionString = "Provider=SQLOLEDB.1;Password=123;Persist Security Info=True;User ID=sa;Initial Catalog=DellOutLabel;Data Source= 192.168.79.9"
.CommandType = adCmdText
.RecordSource = "select * from xscanstr1table where mdate between '2010-8-1' and '2010-8-31' and Scanstr1 like '%904EM07S010397%'"
.Refresh
End With
Set DataGrid1.DataSource = Adodc1
DataGrid1.Refresh
End Sub 展开
Private Sub Form_Load()
With Adodc1
.ConnectionString = "Provider=SQLOLEDB.1;Password=123;Persist Security Info=True;User ID=sa;Initial Catalog=DellOutLabel;Data Source= 192.168.79.9"
.CommandType = adCmdText
.RecordSource = "select * from xscanstr1table where mdate between '2010-8-1' and '2010-8-31' and Scanstr1 like '%904EM07S010397%'"
.Refresh
End With
Set DataGrid1.DataSource = Adodc1
DataGrid1.Refresh
End Sub 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询