|
Hi. We are having an intermittent problem with our application where a resultset will return null values in several fields for several records when there should be data in those fields. I believe it may be related to the "blockSize" setting of the datasource. The blockSize is set to the default of 32. Some background: I need to iterate through a resultset and put the data into a collection so I can transfer this data to an applet. We notice that sometimes the 31st record of a collection will have null values half way through the record. The next few records will have sporadic data, and then all is fine until we get to the 62nd record. At that point, the same thing happens - a null value half way through the record, and then the next few records have some null values in them. This behavior will continue for 5-30 minutes and then it goes away. When this is happening to a particular procedure, other procedures will run fine with no dropping of values. We are on V5R1, using the Native driver. We are upgrading to V5R2 this weekend. It is very hard to troubleshoot because it may not happen even once a week and we cannot force the condition. Any help would be greatly appreciated. Thanks This is the method I use to create a collection: ----------- public static ArrayList ResultSetToList(ResultSet rs) { ArrayList list = new ArrayList(); Object[] row = null; try { ResultSetMetaData meta = rs.getMetaData(); int columnCount = meta.getColumnCount(); while (rs.next()) { row = new Object[columnCount]; for (int i = 0; i < columnCount; i++) { row[i] = rs.getObject(i + 1); } list.add(row); } } catch (Exception e) { System.err.println("Error in ResultSetToList()"); e.printStackTrace(); list = new ArrayList(); } return list; } Todd Bryant Programmer/Analyst University of Nebraska Foundation 402-472-0107
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.