• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

db data

 
Matt Cannata
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Has anyone else run into a problem of corrupted data being returned from the Data class? The readRecord method contains the following line(only change was removal of 2nd parameter due to deprecation)
rv[i] = new String(buffer, offset, description[i].getLength());
This indicates that the the read is for the field length, no matter how long the data actually was. As a result, when I displayed the data in the gui, it was padded with garbage characters like:
SpeedyAir[][][][] (Boxes instead of brackets)
I solved the problem by calling String.trim() on all the Strings returned by Data. I was just wondering if this is indicative of a larger problem that I need to deal with.
Thanks,
Matt
 
Lisa Foster
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Matt your fine everyone did the same thing.
It is unavoidable your on track
Lisa
 
Ken Zrobok
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What GUI are you displaying the info on? I think the boxes are the GUI's way of displaying spaces. I have found that \n and \t will be represented in the view of your GUI as the boxes[].
Hope this helps
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic