Trying to access the postgresSQL database from Delphi Seattle via the ODBC driver.

I get the error: error

Everywhere on the Internet it is written that this is due to the fact that the application is assembled as 32-bit, and the driver is used 64 bit. But both the 64bit driver and the application, as seen in the screenshot, are built under win64. I am already desperate ((I do not understand what the problem is ((

DSN:

error2

  • Run under the debug? Is the DSN exactly 64-bit and not 32-bit configured? - kami
  • Kami, I do not run, this is a design-time setting. - user1443993
  • DSN 64bit Attached photo. - user1443993
  • это design-time настройка so Delphi has been 32-bit all its life. Here you have a mismatch. At runtime, everything should be fine :) - kami
  • one
    Один вопрос остался - so ask it! On stackoverflow, it is assumed that way: one topic - one question. Clarifications - in comments, answers - in answers :) - kami

1 answer 1

Despite the fact that Embarcadero RAD Studio has been able to create 64-bit applications for quite a long time, the development environment itself remains 32-bit.

Therefore, if you need to use a connection to the database via ODBC in design-time, you need to configure a 32-bit connection (and not forget that 64-bit for 64-bit applications will be used at runtime). In 64-bit Windows, you must run %systemdrive%\Windows\SysWoW64\Odbcad32.exe

Read more: https://support.microsoft.com/ru-ru/kb/942976