Connect

emnu

Member
Hi,

I wander if you can ommit the HOST & SERVICES file where connecting to a database on a remote machine ?

We want to connect with -H -S parameters to a remotre machine,
but doesn't want to set the ip-name/ip-adress in host file and
service-port in services files on the winsysdir HOSTS & SERVICES
files.

Problem is that if we connect like this:

DEF VAR cHost AS CHAR NO-UNDO INITIAL "132.20.20.1".
DEF VAR cServ AS CHAR NO-UNDO INITIAL "2500".

CONNECT <db> -H VALUE(cHost) -S VALUE(cServ) -N tcp.

the system searches for -H 132.20.20.1 in the HOST file !
and doesn't connect directly to this address, so in some
cases it takes a lot of time to connect with a normal dial-up
modem.

Is there a solution for the fact that you can assign directly an
ip-address to the -H parameter en db-port to the -S parameter
without a lookup in the Host / Services table. In other words,
to explain to the connect procedure to use the parameter
instead of searching in hosts.

if we put this in hosts

132.20.20.1 132.20.20.1

It works smoothly, but we don't want to put the information
in the host/services files .

Any Clues ?

Emmanuel Nuyttens
C&C Belgium
 
Top