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. Sqlite3 string encoding problem

Sqlite3 string encoding problem

Scheduled Pinned Locked Moved General and Desktop
3 Posts 3 Posters 2.1k 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.
  • C Offline
    C Offline
    curedream
    wrote on 29 Mar 2012, 05:00 last edited by
    #1

    AA Table
    a
    1 192.168.1.1:8000

    select a from aa

    qry->values(0).toString() -> 192.168.1.1? error
    QString::fromUtf8(qry->values(0).toByteArray()) -> 192.168.1.1:8000 ok

    but i want into data to db

    "insert into a values("192.168.1.1:8000")" -> save data 192.168.1.1?
    tr("insert into a values("192.168.1.1:8000")").toUtf8 -> save data 192.168.1.1?

    How can i do save 192.168.1.1:8000

    plz help me.

    1 Reply Last reply
    0
    • L Offline
      L Offline
      leon.anavi
      wrote on 29 Mar 2012, 07:00 last edited by
      #2

      You might have syntax error at your SQL statement. Could you please explain again what kind of SQL statements do you want to execute and what problem do you have?

      http://anavi.org/

      1 Reply Last reply
      0
      • L Offline
        L Offline
        Lykurg
        wrote on 29 Mar 2012, 09:50 last edited by
        #3

        bq. insert into a values(...

        According to what you have written a is a column, aa is the table. Please post real code!

        1 Reply Last reply
        0

        2/3

        29 Mar 2012, 07:00

        • Login

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