PostgreSQL and lazarus lazarus / 16-Databases ---------------------------------------------------------------------- d_fly · 2007-06-03 18:01 I've installed PostgreSQL 8.2.4-1 and i'm when i set the PGconnection active i get the error "Can not load PostgreSQL client. Is it installed? (libdb.dll)" On this tuturial http://wiki.lazarus.freepascal.org/Lazarus_Database_Tutorial the error is described on the  section Lazarus and PostgreSQL, but the lib is libdb.so how to solve this?? ---------------------------------------------------------------------- Phil · 2007-06-03 20:45 Quote from: "d_fly"I've installed PostgreSQL 8.2.4-1 and i'm when i set the PGconnection active i get the error "Can not load PostgreSQL client. Is it installed? (libdb.dll)" On this tuturial http://wiki.lazarus.freepascal.org/Lazarus_Database_Tutorial the error is described on the  section Lazarus and PostgreSQL, but the lib is libdb.so how to solve this?? Are you using Windows or Linux? On Windows, I believe the runtime file is named libpq.dll; on Linux presumably it's named libpq.so. With Windows try locating and putting libpq.dll in your .exe's folder; on Linux I believe you need to make sure libpq.so is somewhere in the search path. I'm just now learning about Postgres myself and may know more later this week. Thanks. -Phil ---------------------------------------------------------------------- d_fly · 2007-06-04 00:32 I'm working on windows. I already found the libpq.dll file and placed it on the folder of the project that i'm working in. It didn't work. What do u mean with the "search path", because i belive windows require that as well, where can i edit this "search path"? tks ---------------------------------------------------------------------- Phil · 2007-06-04 00:44 Quote from: "d_fly"I'm working on windows. I already found the libpq.dll file and placed it on the folder of the project that i'm working in. It didn't work. What do u mean with the "search path", because i belive windows require that as well, where can i edit this "search path"? tks If your .exe requires a specific .dll, normally putting it in the same folder as the .exe is all you need to do. Sounds like you're already do that. Must be something else going on with Postgres. Which unit are you using in your app, Postgres or Postgres3? Thanks. -Phil ---------------------------------------------------------------------- d_fly · 2007-06-04 10:57 ok thanks allot it's working, i was doing an error because i inserted the .dll inside a folder in the project folder. It looks like it has to be inserted directly in the project folder. But puting the sqlpq.dll was not enough, so i've placed the all contenet of the bin folder of the Postgre in the project path, and it works just fine. This looks like a solution but it seems to me there are better ways to solve this (at least there should be), but for now it's great. ---------------------------------------------------------------------- tatamata · 2007-06-12 09:39 Hello. If you are using PostgreSQL as localhost (PostgreSQL installed on your computer), then you don't need to copy content of PostgreSQL bin folder to your project folder. Instead, you just need to set Windows environmental variable called Path, to include path to the PostgreSQL "bin" folder. Bin containes all libraries and programs. You do it the following way: Right click on "My Computer" icon, chooce "Properties" then go to "Advance" tab. There you click "Environmental variables" button. Then you find list "System variables". Find variable "Path" in the list. Go to Edit. There you append the following string in the "Variable value": "C:\Program Files\PostgreSQL\8.1\bin;", assuming that you have PostgreSQL 8.1.X installed. If you entered this string correctly, your .exe will now know where PostgreSQL client libraries reside, and it will work. I think it is generally the better way to deploy just .exe, not client libraries, because you can't know which PostgreSQL server version will be installed on the user's computer. Regards, Zlatko ---------------------------------------------------------------------- jdbedoyao · 2007-07-07 21:18 :oops: Queridos Compañeros, Tengo un problema   con la componente Query; y es que no se como mandar un parametro con param.parambyname me pueden ayudar con algun ejemplo o algun link de ayuda para esto. No se donde encontrar mas Gracias a todos JOSE DARIO BEDOYA ORTIZ ---------------------------------------------------------------------- antonio · 2007-07-07 22:15 There's a database tutorial here: http://wiki.lazarus.freepascal.org/Lazarus_Database_Tutorial ---------------------------------------------------------------------- jdbedoyao · 2007-07-08 00:19 Queridos Compañeros, Antonio, ya esto lo he visto antes, el problema como ya dije es que no puedo usar los parametros;  param.parambyname me pueden ayudar con algun ejemplo o algun link de ayuda para esto. Seguire esperando Gracias a todos JOSE DARIO BEDOYA ORTIZ ---------------------------------------------------------------------- antonio · 2007-07-08 02:41 On my portuguese version the wiki says: "Também achei que não poderia conectar ao mysql usando a chamada mysql_connect(), mas tive que usar mysql_real_connect() que tem muitos mais parâmetros. Para complicar, o número de parâmetros parece ter mudado entre a versão 3 (quando eram sete) e a versão 4 (em que há oito). Antes de usar mysql_real_connect eu tive que usar mysql_init() que não é encontrada no mysql.pp original mas o é no mysql_v4.pp. "Assim o código para a conexão ao banco de dados agora é:" And follows an example code. Have you ever used Zeos? Try it.