ADO连接DBF数据库

'ADO连接DBF数据库
Dim conn As New ADODB.Connection
conn.ConnectionString = "provider=msdasql;DRIVER=Microsoft Visual FoxPro Driver;UID=;Deleted=yes;Null=no;Collate=Machine;BackgroundFetch=no;Exclusive=No;SourceType=DBF;SourceDB=f:\;"
conn.Open
Sql = "select * from rs02201602.dbf "
  Rs.Open Sql, conn, adOpenStatic, adLockPessimistic
    Set DataGrid1.DataSource = Rs

You may also like...

发表评论