Re: Can't connect using Win95 client

Bob Kimble <bob-ECzipMoozfpWk0Htik3J/[email protected]>
Newsgroups gmane.comp.python.db.pypgsql.user
Organization iPlicity, Inc.
Message-ID <[email protected]>
My guess is that the Windows 95 TCP/IP stack isn't figuring out that 
192.168.1.160 is a TCP/IP address instead of a host name. Perhaps you could 
put an entry in your hosts file -- c:\windows\hosts or some such thing -- and 
that might trick the TCP/IP stack into resolving the IP address. You should 
find c:\windows\hosts.sam file, which you can copy to c:\windows\hosts as a 
start if you don't already have one.

I think good practice is to have a localhost entry, so your hosts file should 
have at least the following two entries:

127.0.0.1  localhost
192.168.1.160  foo

where "foo" is an arbitrary name for your PostgreSQL server.

HTH.

.... Bob

On Wednesday 11 June 2003 22:49, Chris Wren wrote:
> Greetings,
>
> I am having trouble connecting to a FreeBSD PostGreSQL server
> using a Windows 95 client.
>
> The code runs _fine_ on several Win98 clients on the same network.
> The command that breaks is as follows:
>
> _______
>
>  self.db = PgSQL.connect( user = self.uid,  host = self.hostname,
> database = self.dbname, password = self.pwd )
> ________
>
> The error message I get is as follows:
> ______
>
>   File "C:\Python22\Lib\site-packages\pyPgSQL\PgSQL.py", line 2118, in
> connect
>     return Connection(connInfo, client_encoding, unicode_results)
>   File "C:\Python22\Lib\site-packages\pyPgSQL\PgSQL.py", line 2215, in
> __init__
>     raise DatabaseError, m
> libpq.DatabaseError: unknown host name: 192.168.1.160
>
> ________
>
> Here are the relevant software versions:
>
> ________
>
> Client:
> Windows 95
> ActivePython 2.2.2 build 224
> egenix-mx-base-2.0.4.win32-py2.2
> pyPgSQL-2.3.win32-py2.2
> wxPythonWIN32-2.4.0.7-Py22
>
> Server:
> IP: 192.168.1.160
> FreeBSD 4.7
> postgresql-7.2.1_1
>
> __________
>
> The Win 95 box seems to have good network connectivity,
> at least it happily accesses a SAMBA server running on the
> same FreeBSD box as the database.
>
> Any clues are, as always, much appreciated.
>
> Thanks,
>
> Chris
>
>
>
>
> -------------------------------------------------------
> This SF.NET email is sponsored by: eBay
> Great deals on office technology -- on eBay now! Click here:
> http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
> _______________________________________________
> Pypgsql-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/pypgsql-users



-------------------------------------------------------
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.