LargeInt fields show up as TStringField in Table component

Forum related to SQLite

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
nostradumbass
Junior Boarder
Junior Boarder
Posts: 27
Joined: 22.05.2008, 23:54

LargeInt fields show up as TStringField in Table component

Post by nostradumbass »

After right click on field collection editor in table component and select 'Add all fields', if there is a LargeInt field, it gets added as a String field.

Is this a bug in ZeosDBO that it is not reading the table structure properly?
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

This might be becuse of the 'loose typing' used by SQLite.
Actually, except for some execptions, SQLite ignores the field type you define. So it's difficult for zeoslib to guess the correct datatype.

Have a look at ConvertSQLiteTypeToSQLType to see how conversion is done.

Mark
Last edited by mdaems on 13.04.2010, 22:39, edited 1 time in total.
Image
pcoenen
Fresh Boarder
Fresh Boarder
Posts: 4
Joined: 02.04.2010, 12:24
Location: Limburg
Contact:

Post by pcoenen »

Hi,

Using ZeosLib Trunk version 774, Delphi 2010, SQLite Databse
After right click on field collection editor in table component and select 'Add all fields', if there is a LargeInt field, it gets added as a String field.
Same problem here but I have a INT64(LARGEINT) in the database that gets added as a TIntegerField.

Any idea?

Pascal
In theory, there is no difference between theory and practice. But, in practice, there is.
pcoenen
Fresh Boarder
Fresh Boarder
Posts: 4
Joined: 02.04.2010, 12:24
Location: Limburg
Contact:

Post by pcoenen »

My own fault :(

I recreated the table and used BIGINT when I created the field in the table. Now I have a TLargeIntField in the field editor.

Great :D
In theory, there is no difference between theory and practice. But, in practice, there is.
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

Pascal,

Did you find the solution by studying the type conversion rules used by zeoslib? When 'yes', can I convince you to write an article about it in the Sqlite section of the Knowledge Base?

Mark
Image
Post Reply