#1 2014-10-25 10:31:25

LarsM
Member
Registered: 2014-10-25
Posts: 1

Connecting to Postgre sample database

Hello,

We just installed the postgre and are now trying the sample 28 but cannot connect to postgre, we get the following problem.

Regards,
Lars

Error is in the connection line itself. I have attached the snapshot of the error.

Error: 'Data source name not specified and no default driver specified (0)'

The connection coding is follows:

aProps := TODBCConnectionProperties.Create('localhost','Driver=PostgreSQL Unicode'+
      {$ifdef CPU64}'(x64)'+{$endif}';Database=postgres;'+
      'Server=localhost;Port=5432;UID=postgres;Pwd=pass','postgres','pass');

The above line is from the Sample 28 and I have included the server name: localhost, username: postgre and password: pass.

And I have also created DSN(Data Source Name) for ODBC connection in the administrative tools for 'PostgreSQL Unicode(x64)'.

Offline

#2 2015-04-20 19:27:05

clive_g
Member
Registered: 2014-04-05
Posts: 10

Re: Connecting to Postgre sample database

Hi
Please feel free to use this as a starting point
http://synopse.info/forum/viewtopic.php?id=2516


This implementation connects to a PostGres database using a Zeos connection.
Using this implementation you will need to ensure you have the library files in the server directory

  • libeay32.dll
    libiconv.dll
    libintl.dll
    libpq.dll
    libxml2.dll
    libxslt.dll
    ssleay32.dll

Offline

Board footer

Powered by FluxBB