小女子的三種連線字串都不行,請高手幫幫忙
DIM DBF_Conn As New ADODB.ConnectionlsConn
lsConn = "Provider=MSDASQL.1;Persist Security Info=False;Data Source=dBASE Files;Initial Catalog=" & isPath
lsConn = "driver=Microsoft Dbase Driver (*.dbf);dbq=" & isPath
lsConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & isPath & ";Extended Properties=Dbase III;"
If DBF_Conn.State = 1 Then DBF_Conn.Close
DBF_Conn.Open lsConn
lsSQL="UPDATE " & lsTableName & " SET TRANSFER='Y' Where Transfer='N'"
DBF_Conn.Execute LSSQL

vbqa 發表在 痞客邦 留言(4) 人氣()