I have a problem with my Visual Studio 2005 C # project. I have been using it on Windows XP since Monday. Then my laptop broke down and on my new one I have Windows 7 64 bit and I still use VS 2005.
There is no problem compiling the source, but when I run the program, it splits into the line below
OdbcConnection cn;
cn = new OdbcConnection("dsn=My_dsn_name;");
I get an error message:
EnrtyPointNotFoundExcepition has been blocked
Unable to find entry point named "InterlockedIncrement" in DLL "kernel32.dll"
I am trying to connect to a Postgres 8.4 database using the 64-bit PostgresODBC driver.
Any solution or workaround is welcome. I need to emphasize that the solution I am creating should run under Windows XP 32bit.
Updated information about the problem (from my comments on comments, but not only):
- When I tried to add a new connection to my VS project, I received the error ERROR [IM014] [Microsoft] [ODBC Driver Manager] The indicated DSN contains an architecture mismatch between the Driver and the Application . I am using Windows 7 64 bit, Postgres ODBC 64-bit driver ver. 9.00.0200, Postgres 8.4 32 bit.
- I have never used Dependency Walker before . But I opened the kernel32.dll file from both systems: system32 and \ SysWOW64 and InterlockedIncrement is present in the files from both folders.
- TableAdapters, Postgres. , WinXP, . , VS2005 TableAdapter "..." Data- > CommandText, ODBC.
EDIT: 1-3 .