BAD INTEGER

Поиск
Список
Период
Сортировка
От Wadhwa, Amit
Тема BAD INTEGER
Дата
Msg-id D84C5C69F2723B43BD7AAFA63D4012BA64EF2E@blrx2kmbgl101.blr.amer.dell.com
обсуждение исходный текст
Ответы Re: BAD INTEGER
Список pgsql-jdbc
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


В списке pgsql-jdbc по дате отправления:

Предыдущее
От: "Scot P. Floess"
Дата:
Сообщение: Re: socket problem
Следующее
От: Dave Cramer
Дата:
Сообщение: Re: BAD INTEGER