ADO和ACCESS2000数据库连接问题
用ADO连接ACCESS2000数据库,在WIN98 WIN2000下工作正常,在英文XP没有安装OFFICE2003工作也正常,但在英文XP安装OFFICE2003后工作不正常,不能打开带查询和排序的SQL语句.
代码如下:
Dim db As New ADODB.Connection 'ADODB Connection对象
Dim rs As New ADODB.Recordset 'ADODB Recordset 对象
strConnect = App.Path & "\数据库.mdb;" & ";Jet OLEDB:Database Password= "
rs.CursorLocation = adUseClient
rs.CursorType = adOpenStatic
rs.LockType = adLockBatchOptimistic
db.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Data Source=" & strConnect
db.CommandTimeout = 30
db.Open
rs.Open "SELECT * FROM 表名 ORDER BY ID ", db, adOpenDynamic, adLockOptimistic
rs.Close
db.Close