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. QT case insensitive
Forum Updated to NodeBB v4.3 + New Features

QT case insensitive

Scheduled Pinned Locked Moved General and Desktop
6 Posts 2 Posters 3.1k Views 1 Watching
  • 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.
  • G Offline
    G Offline
    ganeshgladish
    wrote on last edited by
    #1

    hi,

    hi have created Qt database ....i am using select command as searching option ....i need this search option as case insensitive (like Hai as hai hAI,......) ....please tell something.....

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andre
      wrote on last edited by
      #2

      That depends on the database that you're using, not on Qt. Note that it is likely that for each database, the solution is different, as this is not a standard part of SQL.

      1 Reply Last reply
      0
      • G Offline
        G Offline
        ganeshgladish
        wrote on last edited by
        #3

        thank you for your reply,
        i understand what u say, i don't where i can mention this case sensitive....

        this is my sample code,

        QSqlQuery query_re_pass(db);
        if(db.isOpen())
        {
        query_re_pass.exec("SELECT * FROM UserDetails WHERE UserName ='"+user_re_name+"'");

        this user_re_name --is my input,
        UserDetails -----is my table
        UserName -----is my column

        1 Reply Last reply
        0
        • A Offline
          A Offline
          andre
          wrote on last edited by
          #4

          Somewhere in your query, probably. Again: this depends on your database. With SqlLite, you can add "COLLATE NOCASE" to your query, but for other databases that may be different. And you are not specifying which database you are using.

          1 Reply Last reply
          0
          • G Offline
            G Offline
            ganeshgladish
            wrote on last edited by
            #5

            i am using QSQLITE

            1 Reply Last reply
            0
            • G Offline
              G Offline
              ganeshgladish
              wrote on last edited by
              #6

              thank you for reply ,
              i got output thank you very much......thanks a lot....

              i got output from this,,,,,
              QSqlQuery query_re_pass(db);
              if(db.isOpen()) { query_re_pass.exec(“SELECT * FROM UserDetails WHERE UserName =\’“user_re_name”\’ COLLATE NOCASE ”);

              1 Reply Last reply
              0

              • Login

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