Qt Forum

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

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    BLOB [solved]

    QML and Qt Quick
    2
    2
    1243
    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.
    • D
      dstudentx last edited by

      I'm using javascript to pull items from a db. I can grab all the text I want but when I try to get a BLOB from an image I get and error
      Do I have to do something special to the var for the BLOB image?
      @
      QML Image: Cannot open: file:///Users/jon/Desktop/QML_test/����
      @
      Here is the code I'm using to get the text and the BLOB that's being a pain in my ass.

      @
      db.transaction(
      function(tx) {
      var rs = tx.executeSql('SELECT * FROM mydb');
      r=""

      switch (b){
         case "title":
             r += rs.rows.item(a).title
             break;
         case "actor":
             r += rs.rows.item(a).actor
             break;
         case "director":
             r += rs.rows.item(a).director
             break;
         case "genre":
             r += rs.rows.item(a).genre
             break;
         case "rating":
             r += rs.rows.item(a).rating
             break;
         case "detail":
             r += rs.rows.item(a).detail
             break;
         case "image":        // my BLOB image
             r += rs.rows.item(a).image
             break;}
      

      })
      return r;
      }
      @

      1 Reply Last reply Reply Quote 0
      • S
        SlimIT last edited by

        Do you really save you image blob into the database or simply the image path ?

        @QML Image: Cannot open: file:///Users/jon/Desktop/QML_test/����@

        1 Reply Last reply Reply Quote 0
        • First post
          Last post