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. BLOB [solved]
Forum Update on Monday, May 27th 2025

BLOB [solved]

Scheduled Pinned Locked Moved QML and Qt Quick
2 Posts 2 Posters 1.3k 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.
  • D Offline
    D Offline
    dstudentx
    wrote on 28 Jun 2013, 22:09 last edited by
    #1

    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
    0
    • S Offline
      S Offline
      SlimIT
      wrote on 29 Jun 2013, 13:38 last edited by
      #2

      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
      0

      1/2

      28 Jun 2013, 22:09

      • Login

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