Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Encrypted sqlite file problem in QT
Forum Updated to NodeBB v4.3 + New Features

Encrypted sqlite file problem in QT

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
encryptionsqliteqml
6 Posts 2 Posters 3.9k 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.
  • H Offline
    H Offline
    halil sogut68
    wrote on 26 Jul 2016, 07:53 last edited by
    #1

    Hi,
    I using Arcgis Runtime SDK for Qt 10.2.6 and Qt 5.4.2 (MSVC 2013, 32 bit) Qt Creator QT\QML side. And we are develop and deploy Adroid app with Android Armeobi-v7a (GCC4.9 , QT 5.4.2) kid.
    I try to open Local database with qml code but sqlite file has password .Is there any way to solve this problem with qml or c++? I download .sqlite file and .ini file from server and save it ,then I want to use it from qml side. But when I run this code I get “Error: file is encrypted or is not a database Unable to execute statement” . Here is below our code:

    var db = LocalStorage.openDatabaseSync("newdb", "1.0", "newdb", 1000000);
    db.transaction(
    function(tx) {
    var rs = tx.executeSql('SELECT * FROM Table);
    if(rs.rows.length<=0){
    showDialog("true")
    }else{
    showDialog("false")
    }
    }
    )

    Best Regards

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 26 Jul 2016, 22:32 last edited by
      #2

      Hi,

      AFAIK, you can't access a custom database through the LocalStorage API. You can however make it available for example through a custom QSqlTableModel.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • H Offline
        H Offline
        halil sogut68
        wrote on 27 Jul 2016, 06:11 last edited by halil sogut68
        #3

        Hi,

        Are there any code example to open sqlite file with password in C++ side ?

        Thanks

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 27 Jul 2016, 09:44 last edited by
          #4

          Are you using an encrypted database ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • H Offline
            H Offline
            halil sogut68
            wrote on 27 Jul 2016, 10:58 last edited by
            #5

            Yes we are using encrypted database .We want to use and open sqlite file in qt side .Database encripted with password using SqliteConnection class from c# side.

            Thanks

            1 Reply Last reply
            0
            • S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 27 Jul 2016, 11:21 last edited by
              #6

              Then you should take a look at the SQLCipher project. AFAIK, you can also find instructions to build a Qt SQL plugin with it to use in your project.

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0

              1/6

              26 Jul 2016, 07:53

              • Login

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