Reputation: 14751
resultset = statemet.executequery("select shift+0 from sportman");
string x = resultset.getstring("shift");
but second line throw exception:
Column 'shift' not found.
shift is bit(8)
and i want to show it to form '000101'
.
Upvotes: 0
Views: 432
Reputation: 9875
Integer.toBinaryString(Integer.valueOf(resultset.getString("shift+0")))
Result is not zero-padded to the width you want though. You may need to add that yourself later.
Upvotes: 1