×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Regular Contributor
    Join Date
    Dec 2010
    Posts
    228

    Question how to store images to a database?

    hello everyone,

    i am facing problem with storing images to a database.
    is it possible to store images to a database and how it can be done?

    Any help wiill be appreciate.
    Thank you in advance

  2. #2
    Super Contributor
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Re: how to store images to a database?

    If by "database", you mean like a SQLite database, then the images would have to be stored as blobs. If you mean simply saving the images to "disk", that can be easily done with the available interfaces such as QPixmap.save(). It's not uncommon to store the images as "disk" files and then keep their names in a database. The names can be generated ones such as "X123.png".

  3. #3
    Regular Contributor
    Join Date
    Dec 2010
    Posts
    228

    Re: how to store images to a database?

    Quote Originally Posted by danhicksbyron View Post
    If by "database", you mean like a SQLite database, then the images would have to be stored as blobs. If you mean simply saving the images to "disk", that can be easily done with the available interfaces such as QPixmap.save(). It's not uncommon to store the images as "disk" files and then keep their names in a database. The names can be generated ones such as "X123.png".
    hi danhicksbyron

    yes i mean to store the images in SQLite database, can u please help me how can i do it to store the images as blobs?
    is there any sample code that can be usefull for me..
    Thank you in advance

  4. #4
    Super Contributor
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Re: how to store images to a database?

    Can u please RTFM? (Hint: The Qt SQL documentation doesn't mention "blobs", but QVariant can reference a QPixmap.)

Similar Threads

  1. Replies: 5
    Last Post: 2010-12-10, 11:03
  2. How to send sms from mobile to a computer and store it in a database.
    By chat2ram in forum General Development Questions
    Replies: 2
    Last Post: 2009-12-21, 08:10
  3. how to use VB to receive incoming sms and store in database
    By lefinale in forum General Messaging
    Replies: 2
    Last Post: 2008-05-29, 03:17
  4. How to store Images in RMS?
    By lightpop in forum Mobile Java General
    Replies: 5
    Last Post: 2005-02-07, 18:11
  5. HOW to store MM into my database
    By sunlr in forum General Messaging
    Replies: 1
    Last Post: 2004-08-03, 09:19

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×