JDBC throws with error code 0
JDBC throws with error code 0
Hello, I am still having troubles trying to determine the source of some rather bizarre behavior here. My database "factory" is on Postgres 6.3 on a Linux box, and I am attempting to access it with a Java program. The database was created using psql "create database SkidData;" and "\i SkidData.i". SkidData.i looks like this: CREATE TABLE SkidData ( WIPno char(6), Style char(8), Color char(3), Width char(3), Size char(3), UPC char(12), Pairs int, SkidNo char(5), CaseNo char(2), SkidType char(2), bCaseFull boolean, bSentTo400 boolean, DatePacked date, TimePacked time, DateShipped date, TimeShipped time, StationID char(1) ); The table was loaded from a flat file using a Java program. When I open psql on the server and type factory=> select distinct SkidNo from SkidData; I get a nice list of skid numbers. The attached file, however, when compiled, produces the following output: loading JDBC class "postgresql.Driver"... connecting to jdbc:postgresql://miranda:5432/factory... executeQuery... Unknown Response Type: return code is: 0 This is making me very confused. Why does it throw if the return code is 0? Can anybody shed some light on this? -- ____________________________________________________________ Glenn Holmer gholmer@weycogroup.com Programmer/Analyst phone: 414.263.8827 Weyco Group, Inc. fax: 414.263.8808
Re: [INTERFACES] JDBC throws with error code 0
От:
Peter T Mount <peter@retep.org.uk>
Дата:
On Fri, 22 Jan 1999, Glenn Holmer wrote:
[snip]
> I get a nice list of skid numbers. The attached file, however,
> when compiled, produces the following output:
>
> loading JDBC class "postgresql.Driver"...
>
> connecting to jdbc:postgresql://miranda:5432/factory...
> executeQuery...
> Unknown Response Type:
> return code is: 0
>
> This is making me very confused. Why does it throw if the
> return code is 0? Can anybody shed some light on this?
This return code is part of the network protocol. It's throwing because
the driver wasn't expecting a packet of type '0'.
Are you using the driver from 6.3, or a later one?
Peter
--
Peter T Mount peter@retep.org.uk
Main Homepage: http://www.retep.org.uk
PostgreSQL JDBC Faq: http://www.retep.org.uk/postgres
Java PDF Generator: http://www.retep.org.uk/pdf