[Gambas-user] Cannot find driver for database: postgresql

johnf jfabiani at ...1109...
Thu Jan 5 06:20:16 CET 2006


On Wednesday 04 January 2006 20:56, Karl Martindale wrote:
> johnf wrote:
> > On Wednesday 04 January 2006 18:16, Karl Martindale wrote:
> >>Hi Guys,
> >>
> >>I've compiled and installed gambas v1.9.23 on a Slackware Linux 10.0 box.
> >>A project that runs on another machine fails with the error: Cannot find
> >>driver for database: postgresql
> >>
> >>When I compiled gambas the postgresql driver was compiled and wasn't
> >> listed as 'disabled' after ./configure
> >>
> >>This install will successfully talk to a MySQL host running on the same
> >>machine. The postgres driver appears to be in the lib directory:
> >>
> >>root at ...56...:/usr/local/lib/gambas2# ls -l gb.db.*sql*
> >>-rwxr-xr-x  1 root root   905 2006-01-05 01:29 gb.db.mysql.la*
> >>lrwxrwxrwx  1 root root    20 2006-01-05 01:29 gb.db.mysql.so ->
> >>gb.db.mysql.so.0.0.0*
> >>lrwxrwxrwx  1 root root    20 2006-01-05 01:29 gb.db.mysql.so.0 ->
> >>gb.db.mysql.so.0.0.0*
> >>-rwxr-xr-x  1 root root 74376 2006-01-05 01:29 gb.db.mysql.so.0.0.0*
> >>-rwxr-xr-x  1 root root   879 2006-01-05 01:29 gb.db.postgresql.la*
> >>lrwxrwxrwx  1 root root    25 2006-01-05 01:29 gb.db.postgresql.so ->
> >>gb.db.postgresql.so.0.0.0*
> >>lrwxrwxrwx  1 root root    25 2006-01-05 01:29 gb.db.postgresql.so.0 ->
> >>gb.db.postgresql.so.0.0.0*
> >>-rwxr-xr-x  1 root root 73938 2006-01-05 01:29 gb.db.postgresql.so.0.0.0*
> >>
> >>I have logged on to that database using the same credentials as in the
> >>project using the CLI program psql.
> >>
> >>Does anyone have a suggestion as to what I'm doing wrong?
> >>
> >>Thanks in advance,
> >>Karl.
> >
> > I'm not sure but can you create a small project on the new computer and
> > make sure the db property is checked - then check for access?
> > John
> >
> >
> > -------------------------------------------------------
> > This SF.net email is sponsored by: Splunk Inc. Do you grep through log
> > files for problems?  Stop!  Download the new AJAX search engine that
> > makes searching your log files as easy as surfing the  web.  DOWNLOAD
> > SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
> > _______________________________________________
> > Gambas-user mailing list
> > Gambas-user at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gambas-user
>
> This fairly minimal project behaves in the same way:
>
> PUBLIC SUB Form_Open()
> DIM conn AS NEW connection
> DIM connected AS Boolean
>
> WITH conn
>          .Type = "postgresql"
>          .Host = "localhost"
>          .Login = "karl"
>          .Name = "growl"
>          '.Password = "karl"
>      END WITH
>
>      TRY conn.Open
>      IF ERROR THEN
>          Message("Failed to open DB connection." & Error.Text)
>          connected = FALSE
>      ELSE
>          connected = TRUE
>      END IF
> END

OK just to be sure you enabled the 'DB' property - right?

Does the message fire in your example? "Failed to open DB connection" ?

Do you have pgAdminIII on the system?  You could use it to insure that you 
have a running postmaster and you are allowed access to the localmachine. 
Also try "ps -efa | grep postmaster" to see if your postgres is running as 
root.

What happens from the example database? Can you get a connection and run a 
simple SQL statement from the example?
John




More information about the User mailing list