关于打开改了后缀名的access数据库的问题
mdb后缀改成了asp 运行时报错-2147217900 FROM 子句语法错误。
代码如下
Public Const JetOLEDB = "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Data Source="
cnnSYS.Open JetOLEDB & sysPath & "\DATA\sys.asp"
Set cmdSYS.ActiveConnection = cnnSYS
cmdSYS.CommandText = "SELECT * from User"
rstSYS.CursorLocation = adUseClient
rstSYS.Open cmdSYS, , adOpenStatic, adLockBatchOptimistic
'User是系统关键字,建议不用作表名,一定要用则要用方括号
cmdSYS.CommandText = "SELECT * from [User]"