Hi
I'm trying to put a resultset into a Vector object.
I've got about 25000 records. When i go through record number 3542 (more
or less) the program stops without giving an error message.
�What is the reason?�Is a problem about Vector object?�Memory
problem?�Loop problem?
Thank you.
Here is the code.
Connection con;
ResultSet recset;
ResultSetMetaData rsMd;
Statement stmt;
Object val = new Object();
con= ConexionBD.getConnection(this.getHostname());
stmt = con.createStatement();
recset = stmt.executeQuery(sql);
rsMd = recset.getMetaData();
totalcolumnas = rsMd.getColumnCount();
while(recset.next()) {
String total= "";
Vector fila = new Vector();
for(int i = 0; i < totalcolumnas; i++){
try{
val = recset.getObject(i +1);
if(rsMd.getColumnType(i+1) == java.sql.Types.DATE
|| rsMd.getColumnType(i+1) == java.sql.Types.TIMESTAMP ){
DarFormato formato = new DarFormato(val);
total =formato.getResultado();
} else {
total = val.toString();
}
}
catch( NullPointerException err){
total =null;
}
catch( Exception err){
this.seterrorMsg( "Error generico: " + err.toString());
}
try {fila.addElement(total);}
catch( Exception err){
this.seterrorMsg( "E al a�adir columna" + err.toString());
}
this.seterrorMsg("A�adida columna " + total + " a la fila " +
rowcount);
}
try {aux.addElement(fila);}
catch( Exception err){
this.seterrorMsg( "E al a�adir fila " + err.toString());
}
}
recset.close();
stmt.close();
ConexionBD.closeConnection(con);
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html