[Qt-interest] How to fetch primary key of database table?

Christopher Rasch-Olsen Raa christopher at technophile.info
Sat Jan 31 18:08:26 CET 2009



On Sat, 31 Jan 2009 17:54:02 +0100, Robert Hairgrove <evorgriahr at hispeed.ch> wrote:
> Unlike ODBC, there don't seem to be any built-in functions in the
> QSql<...> objects for retrieving the names and columns of primary key
> constraints in database tables.

How about QSqlTableModel::primaryKey() ?
 
> If there are, it would be nice to know how to do this in a
> DBMS-independent manner. Thanks!
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
--
Christopher




More information about the Qt-interest-old mailing list