#1 2014-11-04 11:10:35

corchi72
Member
Registered: 2010-12-10
Posts: 232

Erro testing Samples\30 - MVC Server\MVCServerPostgreSQL

I'm testing the example Samples\30 - MVC Server\MVCServerPostgreSQL, and An error occured when it try to creating the table public.bloginfo:

my connection is :

TSQLDBZEOSConnectionProperties.URI(dPostgreSQL,'localhost:5432',
      //'C:\Program Files\PostgreSQL\9.3\lib\libpq.dll',false),
      'C:\Users\corchi\Documents\zeoslib\lib\postgresql\libpq73.dll',false),
    {$endif}
    {$ifdef USEFIREDACPOSTGRESQL}
    aExternalDB := TSQLDBFireDACConnectionProperties.Create(
      'PG?Server=localhost;Port=5432',
    {$endif}
      'postgres','postgres','admin');

I'm tested also with libpq74.dll /80.dll/81.dll

PostgreSQL  version  9.3

file:
mORMotDB

function :
constructor TSQLRestStorageExternal.Create(aClass: TSQLRecordClass;
  aServer: TSQLRestServer);

// create corresponding external table if necessary, and retrieve its fields info
  fProperties.GetFields(fTableName,fFieldsExternal);  ..............................................................   this line create the exception
  if fFieldsExternal=nil then begin



thank corchi

Last edited by corchi72 (2014-11-04 11:41:45)

Offline

#2 2014-11-04 11:49:08

miab3
Member
From: Poland
Registered: 2014-10-01
Posts: 188

Re: Erro testing Samples\30 - MVC Server\MVCServerPostgreSQL

@corchi72,

Maybe you have old tables:

drop table article;
drop table articlesearch;
drop table author;
drop table bloginfo;
drop table comment;
drop table tag;

Or the old ZEOS or old mORMot?

Michal

Last edited by miab3 (2014-11-04 11:56:29)

Offline

#3 2014-11-04 13:16:55

EgonHugeist
Member
From: Germany
Registered: 2013-02-15
Posts: 190

Re: Erro testing Samples\30 - MVC Server\MVCServerPostgreSQL

@corchi72

corchi72 wrote:

I'm tested also with libpq74.dll /80.dll/81.dll

what's that? Use always the client-libs of your installtion!

Offline

#4 2014-11-04 14:20:32

corchi72
Member
Registered: 2010-12-10
Posts: 232

Re: Erro testing Samples\30 - MVC Server\MVCServerPostgreSQL

1)not,  I have downloaded last version of source mORMot 31/10/2014.

2)The postgres 9.3 is new, infact I don't know this database  very well but I  read that it is easy to learn

3) I downloaded zeoslib from this: svn://svn.code.sf.net/p/zeoslib/code-0/trunk

the following lines is written into the file :ZDbcPostgreSqlMetadata
   
The project web site is located on:                     }
{   http://zeos.firmos.at  (FORUM)                        }
{   http://sourceforge.net/p/zeoslib/tickets/ (BUGTRACKER)}
{   svn://svn.code.sf.net/p/zeoslib/code-0/trunk (SVN)    }
{                                                         }
{   http://www.sourceforge.net/projects/zeoslib.

Offline

#5 2014-11-04 14:32:30

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

Re: Erro testing Samples\30 - MVC Server\MVCServerPostgreSQL

We did not upgrade to Postgres 9.3 yet.

Just checked sample 30 with the latest mORMot + Zeos 7.2 testing.
Working as expected.
Ensure you got the http://svn.code.sf.net/p/zeoslib/code-0 … ng-7.2/src branch.
Michael committed some fixes in the testing branch. Perhaps they are not part of the trunk yet.

Offline

#6 2014-11-04 14:37:56

miab3
Member
From: Poland
Registered: 2014-10-01
Posts: 188

Re: Erro testing Samples\30 - MVC Server\MVCServerPostgreSQL

@ab,

It works with PostgreSQL 9.3:
http://zeoslib.sourceforge.net/viewtopi … 033#p35033

Michal

Offline

#7 2014-11-04 14:39:50

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

Re: Erro testing Samples\30 - MVC Server\MVCServerPostgreSQL

miab3 wrote:

It works with PostgreSQL 9.3

Great!
Thanks for the feedback.

But did you test the metadata retrieval?
Our sample 15 does not test metadata retrieval, since it drops then recreate the table on each iteration.

Offline

#8 2014-11-04 14:49:49

miab3
Member
From: Poland
Registered: 2014-10-01
Posts: 188

Re: Erro testing Samples\30 - MVC Server\MVCServerPostgreSQL

@ab,

30 - MVC Server
works for me with PostgreSQL 9.3 too.

Currently:
mORMot 2014-11-03 19:54:47 1.18.467
and
ZEOS 7.2 2014-11-04 Revision 3465.

Michal

Last edited by miab3 (2014-11-04 14:56:33)

Offline

#9 2014-11-04 15:05:53

EgonHugeist
Member
From: Germany
Registered: 2013-02-15
Posts: 190

Re: Erro testing Samples\30 - MVC Server\MVCServerPostgreSQL

@corchi72 again:

use the libraries of your PostgreSQL server. You can find them in ...\PostgreSQL\9.3\Bin
You're simply trying to access a protocol v3 server with deprecated protocol v2 libraries.

Michael

Offline

#10 2014-11-04 15:33:12

miab3
Member
From: Poland
Registered: 2014-10-01
Posts: 188

Re: Erro testing Samples\30 - MVC Server\MVCServerPostgreSQL

@ab

30 - MVC Server from today(ZEOSLIB 7.2 Revision 3465), also works with Firebird 3.0 smile

Michal

Offline

#11 2014-11-04 15:41:12

corchi72
Member
Registered: 2010-12-10
Posts: 232

Re: Erro testing Samples\30 - MVC Server\MVCServerPostgreSQL

not, it not working 'C:\Program Files\PostgreSQL\9.3\bin\libpq.dll'

Offline

#12 2014-11-04 15:51:15

moctes
Member
From: Mexico
Registered: 2013-05-11
Posts: 129

Re: Erro testing Samples\30 - MVC Server\MVCServerPostgreSQL

corchi72 wrote:

not, it not working 'C:\Program Files\PostgreSQL\9.3\bin\libpq.dll'


I copied libpq.dll and libintl.dll into my app folder and all is working fine, are you sure these files are in a path discoverable by your application?

miab3 wrote:

30 - MVC Server from today(ZEOSLIB 7.2 Revision 3465), also works with Firebird 3.0 smile
Michal

Hi Michal, did you noticed any performance differences with FB 3.0 vs FB 2.5 ?

Offline

#13 2014-11-04 16:06:39

corchi72
Member
Registered: 2010-12-10
Posts: 232

Re: Erro testing Samples\30 - MVC Server\MVCServerPostgreSQL

I copied libintl-8.dll and libpq.dll into Samples\30 - MVC Server\MVCServerPostgreSQL, then I correct my code with

 {$ifdef USEZEOSPOSTGRESQL}
    aExternalDB := TSQLDBZEOSConnectionProperties.Create(

      TSQLDBZEOSConnectionProperties.URI(dPostgreSQL,'localhost:5432',
      'C:\Users\corchi\Documents\Test sample\30 - MVC Server\libpq.dll',false),
      //'C:\Users\corchi\Documents\zeoslib\lib\postgresql\libpq72.dll',false),
    {$endif}
    {$ifdef USEFIREDACPOSTGRESQL}
    aExternalDB := TSQLDBFireDACConnectionProperties.Create(
      'PG?Server=localhost;Port=5432',
    {$endif}
      'postgres','postgres','admin');

but not working the exception is :

Project MVCServerPostgresSQL.exe raise exception class Exception with message 'Client-Library
'C:\Users\corchi\Documents\Test sample\30 - MVC Server\libpq.dll'
found but could not be loaded. Check compile-target and library compatibility!.

Last edited by corchi72 (2014-11-04 16:28:40)

Offline

#14 2014-11-04 16:10:09

miab3
Member
From: Poland
Registered: 2014-10-01
Posts: 188

Re: Erro testing Samples\30 - MVC Server\MVCServerPostgreSQL

@moctes

By me FB3 is slightly slower than FB2.53 (with a simple single access),
but from what I read it have a lot of interesting extensions.

Michal

Last edited by miab3 (2014-11-04 16:10:26)

Offline

#15 2014-11-04 17:09:20

EgonHugeist
Member
From: Germany
Registered: 2013-02-15
Posts: 190

Re: Erro testing Samples\30 - MVC Server\MVCServerPostgreSQL

@corchi72

note:
You can't load a 64Bit dll with a 32Bit compiletarget. My error-message told you: The file was found but we can't load this lib!
C:\Program Files\ is propably the 64Bit directory.

This is also NO problem. Just download the 32Bit client from http://www.enterprisedb.com/postgresql- … =Crossover
This is NO installer since you've allready installed the 64Bit server. Then use the lib's of the zip. Best practice: Copy them to C:\windows\SYSWOW64 which is made for the !!!32Bit!!! libs. In addition copy the libs of your current installation to C:\Windows\system32 which is made for the !!!64Bit!!! DLL's. Delete all other approaches you made... have fun!

Offline

#16 2014-11-05 11:02:56

miab3
Member
From: Poland
Registered: 2014-10-01
Posts: 188

Re: Erro testing Samples\30 - MVC Server\MVCServerPostgreSQL

@All

I would recommend ZEOSLIB 7.2 Revision 3470:
http://zeoslib.sourceforge.net/viewtopi … 064#p35064

Michal

Offline

#17 2014-11-05 13:44:29

corchi72
Member
Registered: 2010-12-10
Posts: 232

Re: Erro testing Samples\30 - MVC Server\MVCServerPostgreSQL

ok perfect, thanks guys now it works!!!

I have used the PostgreSQL that you have indicated to me: "postgresql-9.3.5-1-windows-binaries"
 

thank corchi

Offline

Board footer

Powered by FluxBB