|
Hello all, I'm having a problem writing to a keyed data queue from my Java class. My class first takes a non-keyed queue entry and separates it into two parts: a six character key and a query string for execution on a remote database. After executing the query string, I gather the responses from the remote system and push it to a keyed dataqueue using the afore-mentioned key. When dumping to System.out, I see the string value of the key just fine. When I write to the data queue using the KeyedDataQueue.write(String, String) method, it writes the data entry but the key value is put in the data queue as all blanks instead of the 6-character string I need it to be. Here is the code: Key = QueueData.substring(0,6); QueueData = QueueData.substring(6,(QueueData.length()-5)); System.out.println("Key : " + Key); System.out.println("QData : " + QueueData.trim()); RemoteStmt.execute(QueueData.trim()); RespText=""; while(RemoteStmt.getMoreResults()) { RemoteRS = RemoteStmt.getResultSet(); while(RemoteRS.next()) { InputStream IS=RemoteRS.getAsciiStream(1); RespText=RespText + RemoteRS.getString(1); } } RespBytes = RespText.getBytes(); System.out.println("Length : " + RespText.length()); if(RespText.length()>0) { RespQueue.write((QueueData.substring(0,6)), RespText.trim()); } } catch (Exception e) { System.out.println("Couldn't finish statement: " + e); } Any help on this would be greatly appreciated. __________________________________________________ Do You Yahoo!? Send your FREE holiday greetings online! http://greetings.yahoo.com
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.