Results 1 to 1 of 1

Thread: Problem saving txtfile contents to database

  1. #1
    Join Date
    Jul 2008
    Location
    Philippines
    Posts
    60
    Thanks
    9
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Problem saving txtfile contents to database

    hi folks,

    i got here a program reading an encrypted textfile then save the data to MySql database.
    i read the textfile using this code:

    Qt Code:
    1. QFile fr(qApp->applicationDirPath() + "/fptemplate.txt");
    2. if (!fr.open(QIODevice::ReadOnly))
    3. return;
    4. QByteArray byte = fr.readAll();
    5. fr.close();
    To copy to clipboard, switch view to plain text mode 

    then i try to debug 'byte', this returns empty.
    but when i try to create a new file then write the data of 'byte', is written correctly.

    my problem here is this, how can i get the data of 'byte' then append it to string so i can
    create mysql query then save it to database?

    i attached here the sample textfile im working for.

    thnks and i hop someone can help me solve my problem.
    Attached Files Attached Files

Similar Threads

  1. Problem saving JPG image
    By avis_phoenix in forum Newbie
    Replies: 1
    Last Post: 31st July 2009, 15:38
  2. Problem refreshing the contents of a QTable [Qt 3.3.8]
    By kalos80 in forum Qt Programming
    Replies: 0
    Last Post: 7th October 2008, 18:08
  3. Problem saving a plot
    By kalos80 in forum Qwt
    Replies: 2
    Last Post: 10th July 2008, 08:31
  4. Saving a QPixmap Object problem
    By StrikerX in forum General Programming
    Replies: 4
    Last Post: 15th November 2007, 02:19
  5. problem with saving QCstrings
    By nass in forum Qt Programming
    Replies: 3
    Last Post: 5th October 2006, 15:12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.