#1 mORMot 1 » Connecting to Postgre sample database » 2014-10-25 10:31:25

LarsM
Replies: 1

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)'.

Board footer

Powered by FluxBB