Page 1 of 1

Assigning an int64 to a table in sqlite

Posted: Thu 20 May 2010 13:11
by sandy771
I need to populate a table with some large integer values.

the fields in the dsqlite database are defined as UNSIGNED BIG INT

Before I converted my code to sqlite I assigned the data ->AsVariant and all worked OK and the numbers displayed correctly in my grid (DevExpress QuantumGrid).

sqlite does not support the ->asVariant method so I have tried ->asInteger. When I do this my integers are rounded down and a load of them are displayed as -ve values.

How can I assign a largeint to sqlite using TuniTable?

Posted: Thu 20 May 2010 14:38
by bork
Hello

Thank you for the information. UNSIGNED BIG INT data type currently is not supported. We will add support of this data type in one of the next builds of UniDAC. Currently you can use BIGINT data type to store big integer values.

Posted: Thu 20 May 2010 15:14
by sandy771
Thanks Bork

I have changed my code to BIG INT, but when I load the table and view in my grid the larger numbers are still truncated to 32 bit.

Is there anyway of loading a 64 bit number into SQlite?

Posted: Fri 21 May 2010 08:42
by bork
According to SQLite documentation (http://www.sqlite.org/datatype3.html) database has the following data types:
- INT
- INTEGER
- TINYINT
- SMALLINT
- MEDIUMINT
- BIGINT
- UNSIGNED BIG INT
- INT2
- INT8
The BIG INT (with space) data type is not present in this list and UniDAC components equate it to Integer. We make the BIG INT data type similar to the BIGINT data type in one of the next builds of UniDAC. But now you should change the field data type from BIG INT to BIGINT. Also if any columns were created in the run-time then please remove them and create again. Columns with data type BIGINT will be created as TLargeintField.

Posted: Fri 21 May 2010 09:48
by sandy771
That worked - Thank You.