Hello,
First: I'm using FPC SVN 2.0.3 from 2006-02-24 TSqlite3Dataset version.
I know that there is some version newer then this but I'd like to stick
with SVN.
Platform: Windows XP Home,Lazarus SVN rev.8817
Why is impossible to use Edit,Post,ApplyUpdates,Refresh functions for
TSqlite3Dataset in SQLMode ? I have defined PrimaryKey which is INTEGER
PRIMARY KEY but is it skipped (for example ApplyUpdates has check for :
if (FPrimaryKeyNo <> -1) and not FSqlMode then (...)
)
So that code does not update database table at all (in SQLMode):
DB.Edit;
DB.FieldByName('Test').AsString := 'Test';
DB.Post;
DB.ApplyUpdates;
DB.Refresh;
For me it's strange because update/delete SQL should work flawless with
SQlMode when PrimaryKey is set (even if table has not define primary key
there is ROWID variable to obtain record ID which may be used for
update/delete statement)
Currently I'm populating dbGrid and let user change default value for
one record using separate ExecSql function - this require RefetchData
and dbGrid row selection is lost.
tSqlite3Dataset is in SQLMode because I need rows ordered so SQL is
really simple : select test from table order by test desc
Also please do not throw exception when field type is unknown (not in
supported list) - just treat it as ftString field of size 10.
You could insist that it's better to use supported field types
(INTEGER,NUMERIC,FLOAT,VARCHAR,CHAR) but would would you do for such query:
select Test || '(default)' as Name from table where Def='T'
union
select Test as Name from table where Def<>'T'
order by Test
Exception : Field type "''" not recognized on concatenated field
Regards
Boguslaw Brandys
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives