Interface to PostGreSQL lazarus / 5-Lazarus Extra Components ---------------------------------------------------------------------- Guest · 2004-04-06 08:47 Hi there ! I've compiled Lazarus under SuSE 9.0. I would like to develop some programs which accesses the PostgreSQL database server. I've noticed that after compile I have only a TDataset object and nothing like TTable or TQuery. For Delphi, Kylix exists a package ZeosDBO which after installing it adds several non-visual components for accessing PostgreSQL. Can I have something like that in Lazarus ? Thanks ! ---------------------------------------------------------------------- headsman · 2004-10-02 14:11 I had the same questions... but the only answer I got is to try (of cource, you need to have the time for it) and then share with others what you found. I had the intention to see if Zeos would work with free pascal, but I think it would not (for the PostgreSQL part only). Any way, if you have time to find and try, or translate the Lunix PostgreSQL interface into FreePascal, tell me! ---------------------------------------------------------------------- Lightning · 2004-10-02 14:35 Zeos components can access many database servers including PostgreSQL, but the problem is that they don't have the time to adapt the components for FPC/Lazarus. The Lazarus team has "better" things to do so it's up to us (those that use it and need this functionality). I adapted some of the Zeos units but it seems that FPC can't work with indexed properties Other people are interested in the Zeos project conversion so maybe a team will be formed :lol: but it seems few people that are good programmers have time these days. ---------------------------------------------------------------------- headsman · 2004-10-02 14:55 Well, until the day few "good programmers have time" (if I have a Linux project requiring Zeos, I'll work on it for sure); I did fond that there is at least a FPC interface to postgreSQL: http://www.freepascal.org/packages/postgres.html so maybe this will be of help for you. I do not have time to look at it, but this is as I tought: a FPC conversion of the c++ headers. This will do the job for a direct access to PostgreSQL, which is much more powerful and faster than any ODBC connections. But unfortunately, this is only for the version 6.3.1... that would be nice to have a 7.4.5 and 8.0. Enjoy! (If you will try!) ---------------------------------------------------------------------- Lightning · 2004-10-02 19:13 You could use the zeos low level api interface, without installing comps. It's also crossplatform. You only have to add Code: [Select] {$IFDEF FPC}   {$MODE OBJFPC}{$H+}  // or {$MODE DELPHI} {$ENDIF} FPC also supports macros that are verry useful for calling convention tricks. I'm not currently using PostgreSQL because i have to run the server on 9x machines. I might need it in the future, but for now FireBird is smart enough, light and works also on 9x and many other platforms. I know version 8 is really powerful, but if you stick to SQL and do not need all the API funcs then maybe older interfaces also work.