Recent

Author Topic: Connecting to postgresql server  (Read 3849 times)

cov

  • Full Member
  • ***
  • Posts: 240
Connecting to postgresql server
« on: May 25, 2008, 04:39:17 pm »
I am trying to use Lazarus to connect with a Postgres Database Server running on Ubuntu 8.04.

My Lazarus App is running on XP and I am getting the following error:

"cannot load postgresql client is it installed (libpq.dll)"

Can anyone assist?

Obviously, I don't have Postgres installed on the windows machine, so the dll is not on it.

Leledumbo

  • Hero Member
  • *****
  • Posts: 8319
  • Programming + Glam Metal + Tae Kwon Do = Me
RE: Connecting to postgresql server
« Reply #1 on: May 26, 2008, 08:47:38 am »
The error message is clear, you need to have libpq.dll in order to use postgresql related functions. I have the latest version (8.3.1), if you want I'll send it to you. You may choose either a complete package or just the dll. Complete: 3,88 MB (7-zip self SFX), dll: 164 KB (uncompressed).

cov

  • Full Member
  • ***
  • Posts: 240
Re: RE: Connecting to postgresql server
« Reply #2 on: May 26, 2008, 02:37:01 pm »
Quote from: "Leledumbo"
The error message is clear, you need to have libpq.dll in order to use postgresql related functions. I have the latest version (8.3.1), if you want I'll send it to you. You may choose either a complete package or just the dll. Complete: 3,88 MB (7-zip self SFX), dll: 164 KB (uncompressed).


Well, I'm not sure I would say it's THAT clear! ;)

Anyway the answer is to download pgadmin3, which, apart from being a good debugging tool for the postgres database, it also has all the required dlls.

Just a word of warning to any others falling into the same gotcha: it's no good just adding the libpq.dll into the same directory as the executable. ALL of the dlls that come with pgadmin3 should be copied over to the C:\WINDOWS\System32\.

I wasn't that keen to install postgres into every client machine that uses my app, but I guess throwing in eight or nine dlls to be copied into the system folder is not such a big deal.... :(

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2519
RE: Re: RE: Connecting to postgresql server
« Reply #3 on: May 27, 2008, 10:29:07 am »
better keep those dll in the place it got installed end only adjust your windows path
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

cov

  • Full Member
  • ***
  • Posts: 240
RE: Re: RE: Connecting to postgresql server
« Reply #4 on: May 29, 2008, 03:45:29 pm »
Marc,

I was afraid of this;

I have managed to get my app to run with the laptop I was developing it on but the problem I was afraid of has come to pass.

The other machines on the network are unable to run, even though I copied all the DLLs into the system32 directory. (I did try adding the path to the DLLs onto the PATH environment variable, but that didn't work)

Even installing pgamin3 does not help. Which I was really not keen on doing.

 

TinyPortal © 2005-2018