File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and the fly likes getBytes() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "getBytes()" Watch "getBytes()" New topic


Jardel Tan

Joined: Sep 11, 2001
Posts: 14
Byte eng
while ( {
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

Joined: Mar 13, 2001
Posts: 276
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");
Jardel Tan

Joined: Sep 11, 2001
Posts: 14
I agree. Here's the link:
subject: getBytes()