Subject | Trigger for a view doesn't work in all circumstances |
---|---|
Author | skoczian |
Post date | 2008-03-11T14:28:02Z |
Hello,
in my (very small) firebird database I've got a view linking two
tables, and a trigger (before insert or update or delete) to make it
updatable. Firebird version: 2.0.3, Gentoo Linux.
With insert or update statements I construct myself in isql or
FlameRobin this works as expected. In a PyQt application using the
QtSql classes this works, if I use a QSqlQuery, where I write the
SQL statements myself. But with a QSqlTableModel no update is made
(no error message either). In this case I can't see or control the
SQL statements the model uses.
To make matters still more confusing, I wrote a "before update"
trigger for the phone_list view of the employee database - and this
is correctly updated by a QSqlTableModel.
I suppose this may mean that the trigger for my own database is
buggy, but too simple update statements don't show the error. Is
there any tool I could use to view the SQL statements produced by
the QSqlTableModel? If I could repeat and vary these statements in
the command line client I might perhaps get to the bottom of this.
in my (very small) firebird database I've got a view linking two
tables, and a trigger (before insert or update or delete) to make it
updatable. Firebird version: 2.0.3, Gentoo Linux.
With insert or update statements I construct myself in isql or
FlameRobin this works as expected. In a PyQt application using the
QtSql classes this works, if I use a QSqlQuery, where I write the
SQL statements myself. But with a QSqlTableModel no update is made
(no error message either). In this case I can't see or control the
SQL statements the model uses.
To make matters still more confusing, I wrote a "before update"
trigger for the phone_list view of the employee database - and this
is correctly updated by a QSqlTableModel.
I suppose this may mean that the trigger for my own database is
buggy, but too simple update statements don't show the error. Is
there any tool I could use to view the SQL statements produced by
the QSqlTableModel? If I could repeat and vary these statements in
the command line client I might perhaps get to the bottom of this.