Is it possible to execute SQL procedure in Delphi 6 BDE TUpdateSQL? -
is possible write execute procedure (...with arguments...)
(for firebird 2.1 database) in delphi 6 bde tupdatesql.modifysql? have tried, receiving error message update failed
simplest sql procedure. - there restrictions on statement can executed in modifysql? know (and using extensively), possible write execute procedure
(and more complex statements) in delphi ibx tibdataset.modifysql (or in other similar properties of ibx components). should avoid execute procedure in tupdatesql or there tricks should take consideration?
rené hoffmann's idea right - possible execute procedure update statement. e.g. following statement accepted in modifysql:
update target_table set id = :id, field1 = :field1, field2 = (select proc.field2 additional_actions_procedure(:field2, :param1, :param2) proc) id = :old_id
delphi unit dbtables
contains code explains why exception raised:
procedure tupdatesql.execsql(updatekind: tupdatekind); begin query[updatekind] begin prepare; execsql; if rowsaffected <> 1 databaseerror(supdatefailed); end; end;
so affected rows counting happens. apparently dbtables
accounting of affected rows differs affected rows count in ibexpert. ibexpert counts real affected rows affected execute procedure
, update
statement or other statements. dbtables
counts (my guess) rows of target table updated update
statement. more investigation of delphi code can reveal more exact explanation.
this comment http://www.delphisources.ru/pages/faq/base/tupdatesql_many_queries.html suggest editing dbtables
file.
Comments
Post a Comment