I've added the queries into the InsertSQL nd UpdateSQL however it seems like it is using the SQL code and make "it's own" update and insert (I know this because the index is set to not null, and in the select statement I retrieve it, but on Update and Insert it raises an exception that the ID is mandatory and is null).
Ido http://ik.homelinux.org/ On Wed, Nov 4, 2009 at 4:27 PM, Michael Van Canneyt <[email protected]>wrote: > > > On Wed, 4 Nov 2009, ik wrote: > > Hello, >> >> How exactly can I make the TSQLQuery work with the Insert query when I do >> "insert" action on TDBNavigator ? >> The same question with update. >> > > Either you specify the SQL directly in the InsertSQL, UpdateSQL, DeleteSQL > properties. > > Do this in the standard way as in Delphi using parameters: > > UPDATE MYTABLE SET > Field1 = :Field1, > Field2 = :Field2 > WHERE > MyKeyField = :Old_MyKeyField; > > and similar for insert/delete. > > or you let SQLDB compute the queries for you, in which case you should > set the pfInKey flag of the ProviderFlags property of the key field, and > the pfInUpdate flag for all fields that must be updated. > > Michael. > > -- > _______________________________________________ > Lazarus mailing list > [email protected] > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus >
-- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
