Hello List!

I am using a QSqlTableModel to display the contents of a database table
in a QTableView.  (I am building a lightweight application to edit some
small database tables.)

I now want to determine whether a given data item exists in the table:  E.g.,
is the result of

   select count(*) from my_table where my_field = 'some_value';

greater than zero?

I can simply run the above query to find out whether the data item exists,
but given that I already have the QSqlTableModel that has already read
the data from the database would it make more sense to "ask" the
QSqlTableModel if the data item exists?  If so, how would I go about
doing so?

(And, if not, any suggestions on the cleanest Qt way to run the query
that looks for 'some_value' would be appreciated.)

Thanks.


K. Frank
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to