Overview
Features
Download
Documentation
Community
Add-Ons & Services

64 bit integers in SQLite

Please post support and help requests here.

64 bit integers in SQLite

Postby rd » 25 Sep 2007, 14:34

Hi,

Poco currently doesn't support 64 bit intergers with SQLite, Utility::getColumnType() always returns MetaColumn::FDT_INT32 for integers. This means a 64 bit value is converted to 32 bits, giving invalid results.

Wouldn't it be better/safer to always return MetaColumn::FDT_INT64 for integers ?

Ronny

rd
 
Posts: 19
Joined: 16 Jun 2007, 15:30

Re: 64 bit integers in SQLite

Postby alex » 25 Sep 2007, 15:50

> Wouldn't it be better/safer to always return MetaColumn::FDT_INT64 for integers ?

Probably so, but I want to hear other opinions before I do that.

There's a bug report filed on the subject:

http://sourceforge.net/tracker/index.php?func=detail&aid=1770516&group_id=132964&atid=725709

Guenter, Peter, any input on this - can we officially change it (I'll take care of it, test and all)?

Alex

alex
 
Posts: 1130
Joined: 11 Jul 2006, 16:27
Location: United_States

Re: 64 bit integers in SQLite

Postby guenter » 27 Sep 2007, 11:01

INT_64 is okay for me.

-guenter
guenter
 
Posts: 1135
Joined: 11 Jul 2006, 16:27
Location: Austria

Re: Re: 64 bit integers in SQLite

Postby alex » 29 Sep 2007, 15:17

> INT_64 is okay for me.

Allright, I have done it. A word of warning, though - __this breaks code__ - following code will now throw BadCastException:
Code: Select all

int a = recordset.value(0,0);

Obviously, this is the way to do it now:
Code: Select all

Int64 a = recordset.value(0,0);

However, if you were using the DynamicAny-based functionality:
Code: Select all

int c = recordset.value(0);

then you're in good shape (:smile:).

Alex

P.S. Will submit code later today.
alex
 
Posts: 1130
Joined: 11 Jul 2006, 16:27
Location: United_States


Return to Support

Who is online

Users browsing this forum: No registered users and 2 guests

cron