Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: ResultSet with more than 5 rows causes error



Il giorno gio, 27/09/2007 alle 12.20 +0200, Ludovico Bianchini ha
scritto:
[...]
> while(source.next()) { 
> insertCall.registerOutParameter(1, Types.INTEGER); 
> for (int i = 1; i <= colCount; i++) { 
> data = source.getObject(i); 
> insertCall.setObject(i+1, data); 
> } 
> insertCall.execute(); 
[...]

I never used CallableStatement, but I do think you should use
	insertCall.setObject(i,data)
instead of
	insertCall.setObject(i+1,data)





Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group