Connect Error for PostgreSQL 9.x

Help
Anonymous
2011-11-04
2013-05-01

  • Anonymous
    2011-11-04

    My dbxconnections.ini:

    DriverName=DbxPostgreSQL
    Database=testDB
    User_Name=postgres
    Password=1234
    RowsetSize=1
    BlobSize=-1
    ; Delphi7Up or 'Delphi6 + DbxXXDrv.pas'
    Trim Char=True
    Custom String=coConnectionString=DATABASE=dbdemos_unicode;SERVER=192.168.190.128;PORT=5432;Socket=4096;UnknownSizes=0;MaxVarcharSize=2048;MaxLongVarcharSize=8190;TextAsLongVarchar=1;UnknownsAsLongVarchar=0;BoolsAsChar=1;CancelAsFreeStmt=0;ExtraSysTablePrefixes=dd_;;LFConversion=1;UpdatableCursors=0;DisallowPremature=0;TrueIsMinus1=0;BI=0;ByteaAsLongVarBinary=0;UseServerSidePrepare=0;coLockMode=-1;coCatPrefix=DATABASE

    dbxdrivers.ini:

    LibraryName=dbxoodbc.dll
    GetDriverFunc=getSQLDriverODBC
    VendorLib=psqlodbc.dll
    DbxOterroRBase TransIsolation=ReadCommited
    Database=DATABASE=dbdemos_unicode;SERVER=127.0.0.1;PORT=5432;Socket=4096;UnknownSizes=0;MaxVarcharSize=2048;MaxLongVarcharSize=8190;TextAsLongVarchar=1;UnknownsAsLongVarchar=0;BoolsAsChar=1;CancelAsFreeStmt=0;ExtraSysTablePrefixes=dd_;;LFConversion=1;UpdatableCursors=0;DisallowPremature=0;TrueIsMinus1=0;BI=0;ByteaAsLongVarBinary=0;UseServerSidePrepare=0
    User_Name=
    Password=
    RowsetSize=1
    BlobSize=-1
    ; Delphi7Up or 'Delphi6 + DbxXXDrv.pas'
    Trim Char=True
    Custom String=coLockMode=-1;coCatPrefix=DATABASE

    DirtyRead=0
    ReadCommited=1
    RepeatableRead=2

    I drop TSQLConnection. Set ConnectionName, DriverName and Params. Click "Connected" property to True.
    Delphi show "Application Error" in Error message.
    Content description: Exception EDbxError in module dbxoodbc.dll at 0003C9A5.

    My used Delphi 7 and PostgreSQL 9.0.
    Please help me~~~! THX!!!

     
  • add to your project file:

    uses
      DbxXXDrv, { ! critical ! }
      …

    Or - to include and debug "dbxoodbc.dll" to exe, do this:

    uses
      FastMM4, { optional by "DbxOpenOdbc.inc" }
      DbxOpenOdbcStatic, { optional }
      DbxXXDrv, { ! critical ! }
      …

     

  • Anonymous
    2011-11-07

    No! I can't connect postgreSQL…
    I add "uses DbxXXDrv". But I get same ERROR message…

    Have similar "dbx_mssql_connect.pas" examples do the same?

     
  • >dbx_mssql_connect.pas
    No!

    Try the second method:

    uses
      FastMM4, { optional by "DbxOpenOdbc.inc" }
      DbxOpenOdbcStatic, { optional }
      DbxXXDrv, { ! critical ! }

    So you can fine-tune the string in the code where it fails(exception).
    Just run in debug mode must be adequately logged calls, so you can understand the method in which an error occurs.

     

  • Anonymous
    2011-11-09

    Ohh!!!
    I know my mistake!!!
    PostgreSQL 9 have not "psqlodbc.dll".
    It have "psqlodbc30a.dll", "psqlodbc35w.dll"

    I hope you will pardon me for troubling you.

    Thank you! Pult!