[Gambas-user] client-server connection
Christian Faure
christian.faurebouvard at ...357...
Thu Dec 15 13:29:49 CET 2005
El Jueves 15 Diciembre 2005 05:36, Ramon Orticio escribió:
> dear friends,
>
> how can a client computer with gambas database
> application access a server with postgres as backend
> database. All of the computers are using redhat9 OS.
>
> can the PGDATA(var/lib/pgsql/data) from the server be
> exported using NFS and mounted on the client computer?
> how do i connect from the client using gambas.
>
> thanks for any idea.
>
>
> ramon
>
Hi Ramon,
do NOT export PGDATA from server,
1. Test if you can access your postgres server from your client computer using
psql at shell prompt, for example:
psql -h myserver_ip -U myuser mydb
and test some sql select
2. If you can access your server, use gambas code like
dim c as Connection
WITH c
.Type = "postgresql"
.Host = "myserver_ip"
.Login = "myuser"
.Password = "mypassword"
.Name = "mydb"
END WITH
TRY c.Open
See help on gambas db component and examples for more info
Regards,
Christian
More information about the User
mailing list