Re: BAD INTEGER

From: Dave Cramer <Dave(at)micro-automation(dot)net>
To: "Wadhwa, Amit" <Amit_Wadhwa(at)Dell(dot)com>
Cc: "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: BAD INTEGER
Date: 2003-03-11 03:23:44
Message-ID: 1047353024.1190.175.camel@inspiron.cramers
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Can you send us test code to demonstrate the problem

Dave
On Mon, 2003-03-10 at 15:19, Wadhwa, Amit wrote:
> Hi
> I have an application which is using an online shopping cart on postgre,
> jsp, tomcat.
> here is how my query goes.
> select prodid, memname, prodqty, prodprice FROM rdnprod something...
> while rs.next()
> {
> insert into rdnordertable(memname, prodid, qty, price, ordernumber)
> values ('memname', rs.getInt("prodid"), rs.getInt("prodqty"),
> rs.getInt("prodprice"), 'new order no.for every row inserted');
> }
> ..or something to that effect.
>
> now the problem im facing here is:
> if i have one product in the rdnprod table, it throws exception bad integer
> in the first iteration
> if i have two products in the rdnprod table, it throws exception bad integer
> in the second iteration
> if i have third product in the rdnprod table, it throws exception bad
> integer in the third iteration
>
> ive checked all datatypes returned by the previous query, they seem to be
> perfect integers, except a bad integer which appears out of nowhere, when i
> fire the same query on the database, it works fine!!
> im not doing any Integer.parseint or anything.
> and this happens only in the last record, WHATEVER IT MAYBE (and only in the
> jdbc resultset, not in the database).
> Im baffled.
> please help.
> Regards,
> Amit
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
--
Dave Cramer <Dave(at)micro-automation(dot)net>

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message J M Okomba 2003-03-11 06:40:27 Problem with driver
Previous Message Wadhwa, Amit 2003-03-10 20:19:41 BAD INTEGER