Windows 10中的MS Access数据库SQL查询问题

时间:2022-06-14 15:43:31

I have been using MS access database ( *.MDB) in a 64-bit format in windows 7 (64-bit) for quite some time. The Access SQL is called from a C++ module. I have recently upgraded my OS to windows 10, I am still able to open connection to the ODBC (user DSN in this case), however, it seems my earlier program can no longer open the table or run queries. I am unsure what are my options now, please advice.
Should I use .accdb in place of .mdb ?

我在Windows 7(64位)中使用64位格式的MS访问数据库(* .MDB)已经有一段时间了。 Access SQL是从C ++模块调用的。我最近将我的操作系统升级到Windows 10,我仍然可以打开ODBC连接(在这种情况下是用户DSN),但是,我的早期程序似乎无法再打开表或运行查询。我不确定现在有什么选择,请指教。我应该使用.accdb代替.mdb吗?

2 个解决方案

#1


0  

Try changing provider in connection string : "Provider=Microsoft.Jet.OLEDB.4.0;" Like this if not yet done so.

尝试在连接字符串中更改提供程序:“Provider = Microsoft.Jet.OLEDB.4.0;”像这样,如果还没有这样做的话。

#2


0  

After testing I found that changing from .mdb to .accdb did solve the problem. I am posting so that I can close this thread and perhaps benefit someone.

经过测试,我发现从.mdb更改为.accdb确实解决了这个问题。我发帖,以便我可以关闭这个帖子,也许有人受益。

#1


0  

Try changing provider in connection string : "Provider=Microsoft.Jet.OLEDB.4.0;" Like this if not yet done so.

尝试在连接字符串中更改提供程序:“Provider = Microsoft.Jet.OLEDB.4.0;”像这样,如果还没有这样做的话。

#2


0  

After testing I found that changing from .mdb to .accdb did solve the problem. I am posting so that I can close this thread and perhaps benefit someone.

经过测试,我发现从.mdb更改为.accdb确实解决了这个问题。我发帖,以便我可以关闭这个帖子,也许有人受益。