sqlite type affinity and multiple data types in one column

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
sandy771
Posts: 194
Joined: Tue 22 May 2007 13:57

Re: sqlite type affinity and multiple data types in one column

Post by sandy771 » Fri 18 Mar 2016 17:14

Thanks for the feedback Alex.

Yes the issue with multiple data types in the same column is my problem and I do see it in third party databases.

I think I see what you are getting at. But if using your test data set I loop through each row using

Variant v;

while(!UniQuery1->Eof)
v=UniQuery1->FieldByName("test")->AsVariant;
UniQuery1->Next()

Then I can get at the correct value for each row as a variant in v

so is it not possible to update your Dac such

while(!UniQuery1->Eof)
v=UniQuery1->FieldByName("test")->AsVariant;
t=UniQuery1->FieldByName("test")->AsRawType;
UniQuery1->Next()

such that ->AsRawType returns the correct storage type used by SQLite?

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: sqlite type affinity and multiple data types in one column

Post by AlexP » Mon 21 Mar 2016 13:37

Both DataSet and TField do not allow for storage of such information, so when referring to the field, we cannot obtain RawType.

Post Reply