on 2012 May 08 11:32 AM
Hi,
I've been using UltraliteJ for Android and trying to get and set unsigned types - specifically int, long and short - to my table from java. But the problem is that I haven't found any method to do it. Anyone knows if are there any way in UltraliteJ to do it?
Table example:
CREATE TABLE unsigned_test ( id INT PRIMARY KEY, value UNSIGNED INT
)
In this case, I want to set a value from java to "value
" table variable and get it after that.
The SqlAnywhere version I've been using is 12.0.1 EBF 3605.
You can use PreparedStatement.set(int, long) for setting values for unsigned int columns, or set(int, int) for unsigned short columns. For unsigned bigint columns, there is no Java primitive type that can be used to store values >= 2^63, but you can use set(int, DecimalNumber) for those values. If the value is < 2^63, you can use set(int, long). Depending on where you get the value from, you could also set it as a string with set(int, String).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
75 | |
10 | |
10 | |
10 | |
10 | |
9 | |
8 | |
7 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.