Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    [SOLVED]QSqlTableModel - table name issue in Postresql

    General and Desktop
    1
    2
    1073
    Loading More Posts
    • 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
      mbnoimi last edited by

      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 Reply Quote 0
      • M
        mbnoimi last edited by

        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 Reply Quote 0
        • First post
          Last post