#1 2015-03-02 00:25:43

kmitchell
Member
Registered: 2015-03-02
Posts: 2

New to mORMot - Can't connect

As the subject says, I'm new to mORMot, but not to programming.  Regardless, I cannot get connected with 28 - Simple RESTful ORM Server.

I have a PostreSQL server running locally, the 32 bit ODBC driver installed (PostgreSQL ODBC Driver ANSI and UNICODE version 9.03.04.00 show in the ODBC Administrator).  So why can I not get the server to work?

I've changed the code:

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

into:

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

What am I doing wrong?

When I compile and run as administrator, it fails, and creates a log with the following errors:

20150301 12090248  !  +    TODBCConnection(01510340).00678985
20150301 12090248  !  -    00.000.011
20150301 12090248  !  +    006783C3
20150301 12090248  ! EXC       EODBCException {"Message":"TODBCLib error: [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified (0)\r\n"} at 0067B057  stack trace API 0052E230 0052E258 0040A308
20150301 12090248  ! ERROR     "EODBCException(01588440)":{"EODBCException(01588440)":{"Message":"TODBCLib error: [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified (0)\r\n"}} stack trace API 0052FCA4 006787C7 0067BBCF 0064F235 00659234 0067B191 00680E5D 778817AD 77BB61BB 77BB6189
20150301 12090248  !  +        TODBCConnection(01510340).00678AF3
20150301 12090248  !  -        00.000.016
20150301 12090248  ! EXC       EODBCException {"Message":"TODBCLib error: [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified (0)\r\n"} at 0067B057  stack trace API 0052E230 0052E258 0040A180 77BDE6C4 77BCCACF 0067B057 0067AB73 00678638 0067BBCF 0064F235 00659234 0067B191 00680E5D 778817AD 77BB61BB 77BB6189

Last edited by kmitchell (2015-03-02 00:28:03)

Offline

#2 2015-03-02 07:00:32

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,662
Website

Re: New to mORMot - Can't connect

Offline

#3 2015-03-03 00:59:17

kmitchell
Member
Registered: 2015-03-02
Posts: 2

Re: New to mORMot - Can't connect

Sorry, I should have mentioned that I'm on 32 bit windows 8.1. 

But you did point me in the right direction; I didn't setup a DSN.  I'm all good now, thanks

Offline

Board footer

Powered by FluxBB