Results 1 to 2 of 2

Thread: QT Sqlite database import/ export csv file

  1. #1
    Join Date
    Mar 2010
    Posts
    1
    Thanks
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default QT Sqlite database import/ export csv file

    How can i export/ import Sqlite database using QT SQL package?. I can import/export Sqlite with Sqlite Commandline tool. How can i do the same in QT? any suggestions?

    Thanks in advance.

    Regards,
    Logesh

  2. #2
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Thanks
    8
    Thanked 133 Times in 128 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QT Sqlite database import/ export csv file

    i cant recall a direct way... but you can easily do this in 10 lines of code.
    Just "Select *" and loop over the results and create a nicely formatted text file using QFile/QTextStream

  3. The following user says thank you to nish for this useful post:

    logesh (18th March 2010)

Similar Threads

  1. Saving parts of an SQLITE database to a new file
    By zarkzervo in forum Qt Programming
    Replies: 2
    Last Post: 21st February 2010, 00:59
  2. Replies: 4
    Last Post: 14th October 2009, 04:28
  3. Good practices for export<->import SQLite datas
    By oscar in forum Qt Programming
    Replies: 1
    Last Post: 8th June 2009, 04:24
  4. QPixmap import/export
    By Matthias in forum Qt Programming
    Replies: 3
    Last Post: 1st June 2007, 09:11
  5. Import PostgreSQL Values to SQLITE
    By raphaelf in forum Newbie
    Replies: 2
    Last Post: 24th May 2007, 17:56

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.