请教各位ADODC连接数据的问题
总提示Adodc2.REFRESH这句有错误(1003),我的数据库是VFP的公积金.DBF自由表,FPSPREAD是表格
Dim MPATH As String, SQL As String, MLINK As String
MPATH = App.Path
If Right(MPATH, 1) <> "\" Then MPATH = MPATH + "\"
SQL = "select from 公积金 where TRIM(公积金.拼音码) like=trim(text1.text)"
MLINK = "Provider=VFPOLEDB.1;Data Source=E:\公积金;Password="";Collating Sequence=MACHINE"
MLINK = MLINK + "data source=" + MPATH + "\公积金.dbf"
Adodc2.ConnectionString = MLINK
Adodc2.CommandType = adCmdUnknown
Adodc2.RecordSource = SQL
Adodc2.REFRESH
fpspread1(0).DataSource = Adodc2
fpspread1(0).Refresh
End If
先谢谢各位,以前用VFP写东西,现在刚学习VB