none
ODBC Data Source Administrator (64-bit) crashes when I try to invoke PostgreSQL ANSI(x64) or Unicode(x64) drivers

    Question

  • ODBC Data Source Administrator (64-bit) crashes with the following operation:

    1. Open 'ODBC Data Source Administrator (64-bit).
    2. Choose 'User DSN' tab
    3. Click 'Add' on right of windows. 'Create New Data Source' window opens
    4. Select driver 'PostgreSQL ANSI(x64)'
    5. Click 'Finish'
    6. Then get message 'ODBC Administrator has stopped working', with only option 'Close program'. A generic, unhelpful message is give: "A problem caused the program to stop working correctly. Windows will close the program and notify you if a solution is available."

    Using the 32 bit ODBC Data Source Administrator and 32 bit driver there is no problem. I also had no problem with this under Windows 7 using the 64 bit drivers. What might cause this? Is there a way to debug and determine whether the driver is at fault or whether it's ODBC Data Source Administrator.

    Further information:

    This Windows 8 Enterprise 64 bit installation was an upgrade from Windows 7 Enterprise 64 bit.

    The PostgreSQL ANSI(x64) driver can be installed from: http://www.postgresql.org/ftp/odbc/versions/msi/

    I am using version 'psqlodbc_09_01_0200-x64'

    Please request any further information that might be useful.

    Regards,
    Tom.

    NB Reposted from   Windows 8 Hardware Compatibility forum. It's not really a hardware problem.

    Monday, November 19, 2012 8:49 AM

Answers

  • Registry key ...\ODBCINST.INI\ contains the installed drivers. If you have installed the PostgreSQL ODBC drivers, you should see the same entries than in the software_old directory.

    If you create an ODBC DSN (which is presumably what you are trying to do), ODBC Data Source Administrator creates the DSN information to addresses

    HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources

    which contains the data source names as a list and

    HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\<DataSourceName>

    which contains driver-specific values that hold the DSN configuration.

    If you had the DSN installed in the old system, you should be able to copy the registry value under the old ODBC Data Sources key, and copy the contents of the old <DataSourceName> Key to the locations given above.

    This is for the 64-bit drivers in 64-bit Windows. 32-bit DSN information is located under key

    HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ODBC\ODBC.INI 


    • Edited by J Lemmetti Tuesday, November 20, 2012 3:16 PM clarification
    • Marked as answer by tomjevans Tuesday, November 20, 2012 10:37 PM
    Tuesday, November 20, 2012 3:15 PM
  • Thanks @JTL1, you have been very helpful!

    I have a working DSN connection now. I followed your method, with a few minor differences:

    1. make a 32 bit DSN connection using 'ODBC Data Sources (32 bit)'.

    2. Open regedit. Edit the above DSN located in (a user DSN): HKEY_CURRENT_USER\Software\ODBC\ODBC.INI

    i. Change driver value to 64 bit driver location (my machine: C:\Program Files\psqlODBC\0901\bin\psqlodbc30a.dll)

    ii. Edit 'ODBC Data Sources' (HKEY_CURRENT_USER\Software\ODBC\ODBC.INI\ODBC Data Sources). Finding above DSN.

    Modify, changing value to 'PostgreSQL ANSI(x64)'.

    I have tested the connection by making a connection with MS Access (External Data>ODBC Database> 'linked table' > 'Machine Data source'), then reading the data tables stored in the database.

    • Marked as answer by tomjevans Tuesday, November 20, 2012 10:54 PM
    Tuesday, November 20, 2012 10:54 PM

All replies

  • Hi,


    This type issue should be more related to SQL product. You may post the issue on SQL forum.

    http://social.msdn.microsoft.com/Forums/en/category/sqlserver


    Kim Zhou

    TechNet Community Support

    Tuesday, November 20, 2012 9:42 AM
  • Thanks for the suggestion. I have reposted to:

    http://social.msdn.microsoft.com/Forums/en/sqldataaccess/thread/a88cf8e6-ce1f-4e49-99ca-54d706243d99

    Tuesday, November 20, 2012 10:33 AM
  • I think that this is mostly related to the ODBC Administrator and the PostgreSQL ODBC driver - not to the SQL Server product or its data access.

    After brief tests I have concluded that the driver itself works: you can use the driver if you e.g. copy the settings from the Windows 7 installation (registry: HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI). The problem seems to be with the PostgreSQL driver editing UI and ODBC Administrator.

    One possible forum for this discussion could be Windows 8 Application Compatibility forum...

    Tuesday, November 20, 2012 12:51 PM
  • Thanks @JTL1,

    I looked at the Windows 7 registry values for

    HKEY_LOCAL_MACHINE\software_old\ODBC\ODBCINST.INI\PostgreSQL ANSI(x64)

    HKEY_LOCAL_MACHINE\software_old\ODBC\ODBCINST.INI\PostgreSQL Unicode(x64)

    They appear to have all of the same values as on Windows 8. In that case, presumably copying registry values from Windows 7 shouldn't help. Is that correct?

    I'll try posting to Compatibility forum in a bit.

    Tuesday, November 20, 2012 1:32 PM
  • Registry key ...\ODBCINST.INI\ contains the installed drivers. If you have installed the PostgreSQL ODBC drivers, you should see the same entries than in the software_old directory.

    If you create an ODBC DSN (which is presumably what you are trying to do), ODBC Data Source Administrator creates the DSN information to addresses

    HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources

    which contains the data source names as a list and

    HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\<DataSourceName>

    which contains driver-specific values that hold the DSN configuration.

    If you had the DSN installed in the old system, you should be able to copy the registry value under the old ODBC Data Sources key, and copy the contents of the old <DataSourceName> Key to the locations given above.

    This is for the 64-bit drivers in 64-bit Windows. 32-bit DSN information is located under key

    HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ODBC\ODBC.INI 


    • Edited by J Lemmetti Tuesday, November 20, 2012 3:16 PM clarification
    • Marked as answer by tomjevans Tuesday, November 20, 2012 10:37 PM
    Tuesday, November 20, 2012 3:15 PM
  • Thanks @JTL1, you have been very helpful!

    I have a working DSN connection now. I followed your method, with a few minor differences:

    1. make a 32 bit DSN connection using 'ODBC Data Sources (32 bit)'.

    2. Open regedit. Edit the above DSN located in (a user DSN): HKEY_CURRENT_USER\Software\ODBC\ODBC.INI

    i. Change driver value to 64 bit driver location (my machine: C:\Program Files\psqlODBC\0901\bin\psqlodbc30a.dll)

    ii. Edit 'ODBC Data Sources' (HKEY_CURRENT_USER\Software\ODBC\ODBC.INI\ODBC Data Sources). Finding above DSN.

    Modify, changing value to 'PostgreSQL ANSI(x64)'.

    I have tested the connection by making a connection with MS Access (External Data>ODBC Database> 'linked table' > 'Machine Data source'), then reading the data tables stored in the database.

    • Marked as answer by tomjevans Tuesday, November 20, 2012 10:54 PM
    Tuesday, November 20, 2012 10:54 PM
  • I should just add. The original problem remains. If I now try to edit the newly created DSN from 'ODBC Data Source Administrator (64-bit)', the programme crashes. However this is not really a problem, as we can always edit the DSN 'manually' through the registry (regedit).

    Most importantly, using the above method, we do have a working DSN connection. I.e. we have bypassed 'ODBC Data Source Administrator (64-bit)'.

    • Edited by tomjevans Tuesday, November 20, 2012 10:58 PM clarification
    Tuesday, November 20, 2012 10:57 PM
  • Still not fixed... sure blame it on Postgres... but this BROKE with Windows 8.... and the ODBC administrator should not crash.

    Since I updated my computer from win7 to win8, my existing DSN's work, but I cannot add any new ones.

    Come on Microsoft, fix what you broke!

    Monday, March 25, 2013 5:26 PM
  • I can reproduce the issue on my machine.

    Basically, the crash occurred inside the Postgres driver (according to the call stack). And the ODBC core component is simply calling the driver's ConfigDSN function. There is nothing changed in that code path between Win7 and Win8.

    Also, I found that the issue has been fixed in Postgres driver v.9.02 (from this thread, it seems that you were using v.9.01). Therefore, please try to download the v.9.02 driver from Postgres website and the issue should be fixed. If not, feel free to reply this thread.

    Thanks,
    Ming.
    WDAC Team, Microsoft.


    Pak-Ming Cheung - MSFT

    Tuesday, June 04, 2013 1:49 AM
  • the issue is not fixed with v.9.02 for my system running Windows 8.1 (using: psqlodbc_09_02_0100-x64.zip). I continue to get "ODBC Administrator has stopped working". Better instructions for manually creating a DSN by editing the registry would be very helpful.

    Wednesday, October 30, 2013 4:01 PM
  • John,

    But I remember I tested the v.9.02 driver and it should work on Win8 before, but i didn't test on Win8.1. Essentially, there is no change in any related code paths between Win8 and Win8.1.

    Actually, since the crash occurred inside the v.9.01 driver, you may probably want to contact the support from Postgres. They have the source code of the driver and they should know whether it is a problem in their driver. There is no much we can do on this issue.

    Thanks,
    Ming.
    WDAC Team, Microsoft.



    Pak-Ming Cheung - MSFT

    Thursday, October 31, 2013 4:15 PM