Win a copy of Functional Reactive Programming this week in the Other Languages 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