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. LocalStorage 2.0: How can i make a query to update datas?
Forum Updated to NodeBB v4.3 + New Features

LocalStorage 2.0: How can i make a query to update datas?

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
3 Posts 2 Posters 676 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.
  • Everton FonsecaE Offline
    Everton FonsecaE Offline
    Everton Fonseca
    wrote on last edited by A Former User
    #1

    var db = LocalStorage.openDatabaseSync("ExampleDatabase", "", "Something", 1000000);
    db.transaction(
    try {
    function(tx) {
    tx.executeSql('UPDATE someTable SET( Column0 = ?,Column1 = ? )', [ 'someData1', 'someData2' ]);
    }
    } catch (err) {
    console.log("Error inserting into table Greeting: " + err);
    }
    )

    when it is execute, it always detect the sql error why?

    Everton FonsecaE 1 Reply Last reply
    0
    • Everton FonsecaE Everton Fonseca

      var db = LocalStorage.openDatabaseSync("ExampleDatabase", "", "Something", 1000000);
      db.transaction(
      try {
      function(tx) {
      tx.executeSql('UPDATE someTable SET( Column0 = ?,Column1 = ? )', [ 'someData1', 'someData2' ]);
      }
      } catch (err) {
      console.log("Error inserting into table Greeting: " + err);
      }
      )

      when it is execute, it always detect the sql error why?

      Everton FonsecaE Offline
      Everton FonsecaE Offline
      Everton Fonseca
      wrote on last edited by
      #2

      obs, i want update the datas in my table

      1 Reply Last reply
      0
      • M Offline
        M Offline
        Mammamia
        wrote on last edited by
        #3

        Try out the example which is available in below given blog. This may give you some idea about how to use Local storage queries.

        QML LoginApp

        and the code available here.

        Git:Code

        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