Thread: Delphi - Developers start develop Access components for Postgres?

Delphi - Developers start develop Access components for Postgres?

From
Daniel Schuchardt
Date:
Hy,

in thread "Adventures in Quest for GUI RAD" there awnsered some Delphi -
Developers.
We actually use Delphi to access PostgreSQL too. But with some problems:

The older Versions of microolab postgresql dac are absolutely trash. I
haven't tried the newer ones.
ODBC / Delphi BDE is ripped out by Borland.
ADO is Microsoft and we look for a not Microsoft dependend product
because are application also runs on unix (with Kylix).
dbexpress is really hard to handle; I dont have extended experience with
DBExpress and vitavoom - dbexpress driver. (www.vitavoom.com).

we use zeos but the older version because of we found many problems in
6.X - Versions. I have fixed up many bugs in zeos 5.4 so it now works
fine with postgres.(7.3-8 running) All in all i have to say Zeos works
but i'm not really happy with zeos because it seems not clear if it has
a future.

Components are very inefficient, every time you open a table all
configuration / table meta data is fetched. No internal caching or sth
like this. (they are still faster than dbexpress / odbc / Zeos6.X)
Fields with unknown length are mapped wrong.
and so on-

With Zeos 6.X you cannot use Postgresql - search path because 6.X
Versions always wrote schema name before table name. 6.X does not
support Cursor Fetch. 6.X isn't speacially for postgres, they try to
support all bigger databases.

Has anyone tried .net - pgsql - driver with Delphi 2005?

All in all my opinion is that there is no really good solution to access
Postgres from Delphi.

Perhaps we should start a project at pgfoundry "PostgreSQL - Access for
Delphi".

Opinions?

Daniel.

Re: Delphi - Developers start develop Access components for Postgres?

From
"Zlatko Matic"
Date:
What about Lazarus Has anybody tried working with Lazarus?

----- Original Message -----
From: "Daniel Schuchardt" <daniel_schuchardt@web.de>
To: <pgsql-general@postgresql.org>
Sent: Tuesday, May 10, 2005 2:27 PM
Subject: [GENERAL] Delphi - Developers start develop Access components for
Postgres?


> Hy,
>
> in thread "Adventures in Quest for GUI RAD" there awnsered some Delphi -
> Developers.
> We actually use Delphi to access PostgreSQL too. But with some problems:
>
> The older Versions of microolab postgresql dac are absolutely trash. I
> haven't tried the newer ones.
> ODBC / Delphi BDE is ripped out by Borland.
> ADO is Microsoft and we look for a not Microsoft dependend product because
> are application also runs on unix (with Kylix).
> dbexpress is really hard to handle; I dont have extended experience with
> DBExpress and vitavoom - dbexpress driver. (www.vitavoom.com).
>
> we use zeos but the older version because of we found many problems in
> 6.X - Versions. I have fixed up many bugs in zeos 5.4 so it now works fine
> with postgres.(7.3-8 running) All in all i have to say Zeos works but i'm
> not really happy with zeos because it seems not clear if it has a future.
>
> Components are very inefficient, every time you open a table all
> configuration / table meta data is fetched. No internal caching or sth
> like this. (they are still faster than dbexpress / odbc / Zeos6.X)
> Fields with unknown length are mapped wrong.
> and so on-
>
> With Zeos 6.X you cannot use Postgresql - search path because 6.X Versions
> always wrote schema name before table name. 6.X does not support Cursor
> Fetch. 6.X isn't speacially for postgres, they try to support all bigger
> databases.
>
> Has anyone tried .net - pgsql - driver with Delphi 2005?
>
> All in all my opinion is that there is no really good solution to access
> Postgres from Delphi.
>
> Perhaps we should start a project at pgfoundry "PostgreSQL - Access for
> Delphi".
>
> Opinions?
>
> Daniel.
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>


Re: Delphi - Developers start develop Access components for Postgres?

From
Daniel Schuchardt
Date:
Me not.

The problem with lazarus is that they don't support many third party
components. We use havily Teechart and Developer Express in our software
so Lazarus isn't a choice for us.

Daniel

Zlatko Matic schrieb:

> What about Lazarus Has anybody tried working with Lazarus?
>
> ----- Original Message ----- From: "Daniel Schuchardt"
> <daniel_schuchardt@web.de>
> To: <pgsql-general@postgresql.org>
> Sent: Tuesday, May 10, 2005 2:27 PM
> Subject: [GENERAL] Delphi - Developers start develop Access components
> for Postgres?
>
>
>> Hy,
>>
>> in thread "Adventures in Quest for GUI RAD" there awnsered some
>> Delphi - Developers.
>> We actually use Delphi to access PostgreSQL too. But with some problems:
>>
>> The older Versions of microolab postgresql dac are absolutely trash.
>> I haven't tried the newer ones.
>> ODBC / Delphi BDE is ripped out by Borland.
>> ADO is Microsoft and we look for a not Microsoft dependend product
>> because are application also runs on unix (with Kylix).
>> dbexpress is really hard to handle; I dont have extended experience
>> with DBExpress and vitavoom - dbexpress driver. (www.vitavoom.com).
>>
>> we use zeos but the older version because of we found many problems
>> in 6.X - Versions. I have fixed up many bugs in zeos 5.4 so it now
>> works fine with postgres.(7.3-8 running) All in all i have to say
>> Zeos works but i'm not really happy with zeos because it seems not
>> clear if it has a future.
>>
>> Components are very inefficient, every time you open a table all
>> configuration / table meta data is fetched. No internal caching or
>> sth like this. (they are still faster than dbexpress / odbc / Zeos6.X)
>> Fields with unknown length are mapped wrong.
>> and so on-
>>
>> With Zeos 6.X you cannot use Postgresql - search path because 6.X
>> Versions always wrote schema name before table name. 6.X does not
>> support Cursor Fetch. 6.X isn't speacially for postgres, they try to
>> support all bigger databases.
>>
>> Has anyone tried .net - pgsql - driver with Delphi 2005?
>>
>> All in all my opinion is that there is no really good solution to
>> access Postgres from Delphi.
>>
>> Perhaps we should start a project at pgfoundry "PostgreSQL - Access
>> for Delphi".
>>
>> Opinions?
>>
>> Daniel.
>>
>> ---------------------------(end of broadcast)---------------------------
>> TIP 4: Don't 'kill -9' the postmaster
>>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
>               http://archives.postgresql.org
>

Re: Delphi - Developers start develop Access components

From
Tony Caduto
Date:
The issues mentioned with Zeos have been fixed, the 6.x branch works very well now and it much faster
thant the 5.x versions.
I use cursors all the time in my functions and return a refcursor which I then fetch.
The latest version of PostgresDAC from microolap also works good, I tried there 1.x stuff but it was designed for PG
7.2
and had no support at all for schemas.

Zeos does seem to be going no where.

I for one would not object to starting something new that just targeted Postgresql and worked with all features
i.e. like canceling a query and asynchronous queries.
The best bet would to just fork Zeos and pull out what is needed, no need to start totally from scratch.

Does anyone have experience writing Tdataset decendents?

The .net driver does work well, but ADO.net does not support always connected sessions, it works in a offline mode
exactly
like tclientdataset.

Even with these small problems I still would never do a GUI database app with C# or Java when I can do it much faster
and
easier with Delphi.



> With Zeos 6.X you cannot use Postgresql - search path because 6.X
> Versions always wrote schema name before table name. 6.X does not
> support Cursor Fetch. 6.X isn't speacially for postgres, they try to
> support all bigger databases.
>>
> Has anyone tried .net - pgsql - driver with Delphi 2005?
>
> All in all my opinion is that there is no really good solution to
> access Postgres from Delphi.
>
> Perhaps we should start a project at pgfoundry "PostgreSQL - Access
> for Delphi".
>


--
Tony Caduto
AM Software Design
Home of PG Lightning Admin for Postgresql 8.x
http://www.amsoftwaredesign.com

Re: Delphi - Developers start develop Access components

From
Daniel Schuchardt
Date:
Tony Caduto schrieb:

> The issues mentioned with Zeos have been fixed, the 6.x branch works
> very well now and it much faster
> thant the 5.x versions.
> I use cursors all the time in my functions and return a refcursor
> which I then fetch.

??
How? On EoF of a TDataSet? Its clear that you can fetch manually. How do
you do that?

> The latest version of PostgresDAC from microolap also works good, I
> tried there 1.x stuff but it was designed for PG 7.2
> and had no support at all for schemas.
> Zeos does seem to be going no where.
>
> I for one would not object to starting something new that just
> targeted Postgresql and worked with all features
> i.e. like canceling a query and asynchronous queries.
> The best bet would to just fork Zeos and pull out what is needed, no
> need to start totally from scratch.

Thats what I would do too. Start a completely new Project makes no
sence, there are good Sources we could take and modify. But for speed
reasons I would support only PostgreSQL and RIP out anything else.

>
> Does anyone have experience writing Tdataset decendents?

Hm me not really, I fixed up things in zeos but thats all. All in all
that can't be really complicated, there are many small components
(textdrivers) and so that all are TDataSet descendents. So I think thats
not the  point most complicated out there.

>
> The .net driver does work well, but ADO.net does not support always
> connected sessions, it works in a offline mode exactly
> like tclientdataset.
>
> Even with these small problems I still would never do a GUI database
> app with C# or Java when I can do it much faster and
> easier with Delphi.
>
Hm I think in that way too. But I try to reduce buissines logic in
Delphi. Delphi is still the best RAD - Developement tool IMHO.

Daniel

Re: Delphi - Developers start develop Access components

From
Tony Caduto
Date:
unless we are thinking of something different I do this:

sql.clear;
sql.add('select myfunction();');
sql.add('fetch all from return_cursor;');
open;

 >
 > ??
 > How? On EoF of a TDataSet? Its clear that you can fetch manually. How do you do that?
 >


--
Tony Caduto
AM Software Design
Home of PG Lightning Admin for Postgresql 8.x
http://www.amsoftwaredesign.com

Re: Delphi - Developers start develop Access components

From
Daniel Schuchardt
Date:
Tony Caduto schrieb:

> unless we are thinking of something different I do this:
>
> sql.clear;
> sql.add('select myfunction();');
> sql.add('fetch all from return_cursor;');
> open;
>
> >
> > ??
> > How? On EoF of a TDataSet? Its clear that you can fetch manually.
> How do you do that?
> >
>
>
??? Thats not really cursor fetch. You always fetch all data this way.
Cursor fetch for example :

DECLARE c_test CURSOR FOR SELECT * FROM art ORDER BY ak_nr;
FETCH FORWARD 10 FROM c_test;

now only 10 Records are fetched via network. So networktraffic is low
and the user has a result imediatly.
now you can do again

FETCH FORWARD 10 FROM c_test;

With CURSOR FETCH I mean fetch data on demand and not as a complete block.

And why you dont return your resulset directly from your function?

example:

CREATE TYPE testresulttest AS (id INTEGER, test VARCHAR);

CREATE OR REPLACE FUNCTION testresult() RETURNS SETOF testresulttest AS $$
DECLARE t testresulttest;
BEGIN
 t.id:=1; t.test:='first row'; --or some record data
 RETURN NEXT t;
 t.id:=2; t.test:='middle row';
 RETURN NEXT t;
 t.id:=3; t.test:='last row';
 RETURN NEXT t;
 RETURN;
END $$ LANGUAGE plpgsql;

SELECT * FROM testresult();

this works fine from delphi too.

Daniel