我可以为我的64位应用程序使用32位ODBC驱动程序吗 [英] Can i use a 32 Bit ODBC Driver for my 64 Bit app

查看:289
本文介绍了我可以为我的64位应用程序使用32位ODBC驱动程序吗的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个进行ODBC连接的Win32应用程序.我们使用SQLDriverConnect()连接 它显示一个对话框以选择数据源.在x64版本中,对话框显示并提供2个不同的32位MS ACCESS驱动程序.当我选择其中之一时,在32位版本中,我会看到一个打开文件对话框,以选择.mdb文件.在64位版本中,此时对SQLDriverConnect()的调用返回-1.

I have a Win32 application that makes ODBC-Connections. We connect using SQLDriverConnect() which displays a dialog to select the data source. In the x64-Version the Dialog shows and offers 2 different 32 Bit MS ACCESS Drivers. When i select one of these, in the 32 Bit version i would see a open file dialog to select a .mdb file. In the 64 Bit version the call to SQLDriverConnect() at this point returns with -1.

SQLError()返回:"[Microsoft] [ODBC驱动程序管理器]数据源名称未找到且未指定默认驱动程序"

SQLError() returns: "[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified"

通常可以从64位可执行文件中使用32位ODBC驱动程序吗?为什么显示这些驱动程序?据我所知,到目前为止还没有64位MS Access OBDC驱动程序.我该怎么办?

Is it in general possible to use a 32 Bit ODBC Driver from a 64-Bit executable? Why are these driver shown? As far as i can find there is no 64 Bit MS Access OBDC driver so far. What can i do?

推荐答案

您绝对不能混合使用32位应用程序和64位驱动程序(反之亦然).

You absolutely cannot mix 32bit application and 64bit driver (or vice-versa).

基本上,ODBC驱动程序通常是由其父应用程序加载的dll(windows)或共享库(linux ...).

Basically, an ODBC driver is, typically, a dll (windows) or a shared object (linux...) which is loaded by its parent application.

共享相同进程空间的所有可执行文件,dll等都必须具有相同的位...

All executables, dlls, etc that share the same process space must be the same bit'ness...

这篇关于我可以为我的64位应用程序使用32位ODBC驱动程序吗的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆