This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes JDBC and Relational Databases 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 OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "getBytes()" Watch "getBytes()" New topic
Author

getBytes()

Jardel Tan
Greenhorn

Joined: Sep 11, 2001
Posts: 14
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

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");
HTH
Dan
Jardel Tan
Greenhorn

Joined: Sep 11, 2001
Posts: 14
thanx!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: getBytes()
 
It's not a secret anymore!