Working with PostgreSQL in LAN

Forum related to PostgreSQL

Moderators: gto, cipto_kh, EgonHugeist, olehs

Strog
Fresh Boarder
Fresh Boarder
Posts: 5
Joined: 04.02.2007, 18:13

Working with PostgreSQL in LAN

Post by Strog »

Hi everybody! I'm new to this forum and to PostgreSQL/ZEOS combination so I would like to know what do I need on client computer to connect to the serever.

Do I need to install PostgreSQL server on clients as well or I need to do something else ( are there any dll-s that I can just copy to client computers in Win\sys32 dir so they can connect to the server without installing the server )? I tried with installing the server and my program worked just fine, and without server I had some problems so I'm curious about that.

Thanks in advance for your answers!

Best regards, Bojan Kopanja.
btrewern
Expert Boarder
Expert Boarder
Posts: 193
Joined: 06.10.2005, 18:51

Post by btrewern »

If you use the PostgreSQL-7 protocol in Zeos then you just need the libpq74.dll from the lib folder in the Zeos distribution. If you use the PostgreSQL-8 protocol you will need the following files:

libpq.dll (or libpq81.dll from zeos lib folder)
comerr32.dll
iconv.dll
krb5_32.dll
libeay32.dll
libiconv-2.dll
libintl-2.dll
ssleay32.dll

these can all be found in the bin folder of your PostgreSQL server installation.

Regards,

Ben
Strog
Fresh Boarder
Fresh Boarder
Posts: 5
Joined: 04.02.2007, 18:13

Post by Strog »

Thanks a lot! I just came with the same list of dll-s by my self and I wanted to wrote it here but I see that you already did it ;).

I just took my program and put it on client without PostgreSQL and I run it then. It gave me a message like "Missign *.dll" every time it started so I justo put those dll-s in the directory with the program and when I put all the dll-s from the list you gave me ( all the dll-s the program was requesting ) it worked with no problems :).

I just neaded to add an IP address of my client computer in pg_hba.conf file on server and that was it. Now everything works OK!

Thanks a lot one more time!
btrewern
Expert Boarder
Expert Boarder
Posts: 193
Joined: 06.10.2005, 18:51

Post by btrewern »

Could this be added to a README or INSTALL file somewhere?

Regards,

Ben
Strog
Fresh Boarder
Fresh Boarder
Posts: 5
Joined: 04.02.2007, 18:13

Post by Strog »

Yes, that would be great because I know that one friend of mine gave up on PostgreSQL because he couldn't connect to it's server through LAN and that's real pity, and I'm sure that he's not the only one. I hope that he'll reconsider his decision now that I can help him, but to prevent that in future it definitely should be noted in some kind of README file...

Best regards,

Bojan Kopanja
okparanoid
Fresh Boarder
Fresh Boarder
Posts: 3
Joined: 13.03.2007, 12:11

Post by okparanoid »

Hello,

I have all this dll in my program's folder, however when i try to execute the program in other clients i have a "Requested database driver was not found" message.

Please someone can help me ?
okparanoid
Fresh Boarder
Fresh Boarder
Posts: 3
Joined: 13.03.2007, 12:11

Post by okparanoid »

Problem is solved. Thanks.

Don't have add the .pas files of the zeos project to the library path of Delphi when installing ZeosLib.

Perhaps this could be add to a install.txt file too.
varathasiva
Fresh Boarder
Fresh Boarder
Posts: 17
Joined: 28.05.2007, 14:31

Post by varathasiva »

Dear Friends,

Here iam trying to configure postgres on windows xp, My windows xp having static ip, i want to access the postgres from outside of my office without using any router portforwading, how to configure like this, i already tried all the ways, now iam tied, anybody having any idea, either my all linux server is working on over the direct static ip, only getting problem in windows xp.

Regards
Siva
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

Maybe it's the build in firewall feature (??) of XP which is blocking connections from outside?

Mark
User avatar
ste_ba
Zeos Dev Team
Zeos Dev Team
Posts: 29
Joined: 15.02.2006, 20:26
Location: Lahntal
Contact:

Post by ste_ba »

Hi,

I have trouble with those DLLs, too (comerr32.dll and such). Sometimes in works to put them into the install directory of my client application, sometimes they need to be in the client's c:\Windows\System32, don't know why. Therefore, I would appreciate it if I could return to protocol postgresql-7 to get rid of all this DLL mess. Is this possible when working with postgresql 8.2, or will it get me into more trouble?

Thanks,
ste_ba
jma_sp
Fresh Boarder
Fresh Boarder
Posts: 3
Joined: 18.11.2008, 16:05
Location: Madrid - España

Post by jma_sp »

Hello everybody, i am using Lazarus 0.9.26. and i was trying to connect with postgreSQL 8.3.4-1 in LAN with ZeosLib 6.6.4-stable.
I am a beginer in BBDD, ¿there is practical examples or tutorial to learn more using zeoslib?
I used the zeoslib graphical components but i was unable to connect. Connection in LAN among pgAdmin III was successful, then i tryed with localhost and zeoslib i wasnt able to connect too.
The info in Lazarus wiki dont help me enough. :book:
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

Try the Knowledge Base on this forum. In the general section there are some good starter documents. Written for IB/Firebird, but that should not make too much difference.

If you can describe you problems more in detail we can help you here. eg. What connection parameters did you set in pgAdmin to connect? What TZConnection properties did you set then. What was the error when calling ZConnection1.Open?

Mark
Image
Khaoz
Fresh Boarder
Fresh Boarder
Posts: 16
Joined: 18.04.2009, 21:01

Post by Khaoz »

Hey guys.

I'm trying to deploy my application. I'm using a installer which i create with innosetup and every dll listed here is placed in c:\windows\system32 but my app does no work asking for libpq81.dll or libpq.dll (i'm using libpq.dll).
I have tried to put in windows\system and in my app dir with the executable wihtout success.

It's a windows xp with sp2.
trupka
Expert Boarder
Expert Boarder
Posts: 140
Joined: 26.08.2007, 22:10

Post by trupka »

Khaoz,
What postgresql version, precisely, are you using?
Khaoz
Fresh Boarder
Fresh Boarder
Posts: 16
Joined: 18.04.2009, 21:01

Post by Khaoz »

8.3.6

i will install sp3 because my wife use windows xp with sp3 and everything works fins.
Post Reply