This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

getBytes()

 
Jardel Tan
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Byte eng
while (rs.next()) {
eng = rs.getBytes("trial");
}
i retrieve error Can't convert byte[] to java.lang.Byte
hi how to getBytes() instead of getString()from databases
 
Daniel Dunleavy
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you don't have your byte defined as an array. What you have, if it could work, would only be able to contain the first byte
try... byte eng[] = getbytes("test");
HTH
Dan
 
Jardel Tan
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanx!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic