[Interest] QSqlTableModel - table name issue in Postresql

Sergey Borovkov serge.borovkov at gmail.com
Tue Apr 9 07:34:28 CEST 2013


SQL is not case sensitive unless you use quotes. So since you created
tables with mixed lower and upper case there is no other choice but to
quote them (or name your tables in lower case separated by underscores
which is more common I believe).

On Sat, Apr 6, 2013 at 4:30 PM, Muhammad Bashir Al-Noimi
<mbnoimi at gmail.com>wrote:

>  Hi All,
>
>
>  Recently I noticed that I’ve to add double quotes to table’s name for
> calling Postgresql’s table while it’s not required for MySQL or SQLite
> tables!!
>
> how can I make QSqlTableModel works in same way for three types of SQLdatabases?
>
>
>  Posgtresql:
>
> p_tableModel->setTable("\"Persons\"");
>
>
>  MySQL & SQLite:
>
> p_tableModel->setTable("Persons");
>
> --
> Best Regards,
> Muhammad Bashir Al-Noimi
>
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20130409/6e4d45cc/attachment.html>


More information about the Interest mailing list