Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.


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 (


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.

asked 08 May '12, 10:32

marcelopaparelli's gravatar image

accept rate: 0%

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).

permanent link

answered 08 May '12, 11:40

Andy%20Quick's gravatar image

Andy Quick
accept rate: 45%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 08 May '12, 10:32

question was seen: 3,509 times

last updated: 08 May '12, 11:40