Access a 32-bit Firebird database from a 64-bit app via ODBC

戏子无情 提交于 2019-12-24 05:11:11

问题


I'm running Win7 64-bit and Firebird 2.5.2.

Is it possible to access a 32-bit Firebird database via ODBC from a 64-bit C++ application? My initial thought was that I could just install the 64-bit Firebird ODBC driver and it would work. Sure enough, after installing it the 64-bit ODBC control panel app shows the Firebird driver, but the connection fails when trying to point it to an .fdb file created with 32-bit Firebird. I'm picking the client library from the 64-bit firebird install as well (C:\Program Files\Firebird\Firebird_2_5\bin\fbclient.dll).

Any suggestions on accessing a 32-bit Firebird database via ODBC from a 64-bit C++ application?


EDIT:

My bad, looks like its working fine. I must have accidentally mixed some 32- and 64-bit pieces of the config when setting things up. Once I ensured that I was 1) running the 64-bit server, 2) using a 64-bit ODBC data source which 3) referred to the 64-bit client DLL (from the 64-bit Firebird install) my 64-bit C++ app connected with no issue.

I thought I checked those but I must have missed something in going between 32- and 64-bit.


回答1:


See edit in original post. The problem was mixing some of the 32- and 64-bit pieces in the config. Its working now. You definitely can access the 32-bit database from the 64-bit app once setup properly. Also according to Mark Rotteveel you can run the 32-bit server and use that from the 64-bit app as long as you're using the 64-bit pieces on the app side.



来源:https://stackoverflow.com/questions/13569933/access-a-32-bit-firebird-database-from-a-64-bit-app-via-odbc

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!