Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

squares pad out the fields in my db

 
dean tomlinson
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
has anyone else's database got hex characters 01 to 1F padding out the fields in their database.
is that one of the functions of the Data subclass, to filter this kind of stuff out?
any advise greatly appreciated. cheers, dean
 
Andre Mermegas
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try out .trim(), should help!
 
dean tomlinson
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
cheers, mate
 
ravi janap
Ranch Hand
Posts: 389
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can't filter out this stuff using trim() , my code is as follows
for ( int i = 1; i < count; i++ ) {
try {
if ( null != ( row = db.getRecord(i) ) ) {
rowData[i] = row.getValues();
}
} catch(DatabaseException dbe)
{
System.out.println(dbe.getMessage());
}
}
JTable table = new JTable(rowData, columnNames);
Please suggest me a way to do this.
Thanks
Ravindra
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In your data class, readRecord method you replaced a deprecated method for the constructor of a String, if you add it to the end of that statement, you will be fine.
So
rv[i] = new String(blahParam, blahParam, etc).trim();

Mark
 
ravi janap
Ranch Hand
Posts: 389
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Great !
The square pads are removed now.
It is high time , I should start using the debugger in IntelliJ IDEA 2.5.1 Java IDE which I am using it to develop my FBN project.
Thanks
Ravindra
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic