mercredi 6 mai 2015

TSqlite3Dataset Edit not working

I have some code like this ` var ds: TSqlite3Dataset; begin ds := TSqlite3Dataset.Create(nil); ds.FileName := ExtractFileDir(ParamStr(0)) + _cDBFile; ds.TableName := 'names'; if ds.Locate('ID', AID, []) then ds.Edit else begin ds.Append; ds.FieldByname('ID').AsInteger := AID; end; ds.FieldByname('Name').AsString "= AName; ds.Post; ds.ApplyUpdates; ... '

The locate works and incase the table is empty, a record is appended. looks good Entering with a different AName and same AID, the name is not updated. I use the precompiled sqlite3.7.16.1-arm4i.dll (or sqlite3.7.16.1-arm4.dll), no other dll's compiled with Lazarus 1.4 (new installed) Am I missing something?

Aucun commentaire:

Enregistrer un commentaire