You are not logged in.
Hi!
I am just trying to run the mORMot Sample 28. I have installed Postgre 9.3 and created DataSourceName for PostgreSQL Unicode(x64) driver in ODBC Data Source Administrator.
My Postgre Data source name is 'PostgreSQL35W' and I don't know where to mention this Data source name in this below sample code?
My Source Code:
aProps := TODBCConnectionProperties.Create('','Driver=PostgreSQL Unicode'+
{$ifdef CPU64}'(x64)'+{$endif}';Database=postgres;'+
'Server=localhost;Port=5433;UID=postgres;Pwd=password','','');
Error:
First chance exception at $763DC42D. Exception class EODBCException with message
'TODBCLib error: [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified (0)
'.
Process RESTserver.exe (2300)
My Question:
In the above Source Code, I gave all my Postgre credentials as it is. But where do I give Data source name which I have created in ODBC Data Source Administrator?
And my doubt was, without mentioning this DSN name how could the program knows which driver or database does we have?
Thanks in advance.
Offline
You should install 32bit ODBC driver for PostgreSQL.
Offline
Thanks @DigDriver, it works now
Offline