Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [SOLVED]QSqlTableModel - table name issue in Postresql
Forum Update on Monday, May 27th 2025

[SOLVED]QSqlTableModel - table name issue in Postresql

Scheduled Pinned Locked Moved General and Desktop
2 Posts 1 Posters 1.2k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mbnoimi
    wrote on 6 Apr 2013, 12:07 last edited by
    #1

    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 SQL databases?

    Posgtresql:
    @p_tableModel->setTable(""Persons"");@

    MySQL & SQLite:
    @p_tableModel->setTable("Persons");@

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mbnoimi
      wrote on 11 Apr 2013, 18:40 last edited by
      #2

      Table's name became case sensitive in Postgres so if any one hates to use double quotes in table's name he/she has to use small letters for all the name in the database.

      1 Reply Last reply
      0

      1/2

      6 Apr 2013, 12:07

      • Login

      • Login or register to search.
      1 out of 2
      • First post
        1/2
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved