[Lazarus] Problem with zeos and sqlite-3

zeljko zeljko at holobit.net
Sun Feb 17 13:09:20 CET 2013


On Sunday 17 of February 2013 12:30:19 Martin Schreiber wrote:
> On Sunday 17 February 2013 12:17:24 zeljko wrote:
> > You misunderstood me. I returns ftIntger too when using SELECT, but WHEN
> > using PRAGMA table_info('testview'); it does not return integer.
> > So what returns tmsesqlquery in this case:
> > 
> > CREATE VIEW "testview" AS select * ,cast(0 as integer) as nullint from
> > table1;
> > 
> > PRAGMA table_info('testview');
> 
> You should use sqlite3_column_type() instead of PRAGMA table_info().

I'm using (actualy it's zeos , not me) sqlite3_colum_type for selects, but for 
metadata it uses pragma and that's problem.  PRAGMA is ok for tables, but it's 
bad for views contains CAST AS SOMETHING since sqlite3 don't know anything 
about it. I'll try to use SELECT instead of PRAGMA for metadata in zeos (in 
case of views) to see if it'll work.

zeljko




More information about the Lazarus mailing list