Results 1 to 4 of 4

Thread: generate XML file using SQL database in QT

  1. #1
    Join Date
    May 2016
    Posts
    17
    Qt products
    Qt4
    Platforms
    Windows

    Question generate XML file using SQL database in QT

    Hello
    I have been working on the project of XML file generation. I have developed GUI using QT4 framework to enter, modify and delete data in SQL database (using tables). I am using Sql Query model for fetching data. After entering data in my database using GUI, I must create XML file of the same data.

    I have confused with two way to generate xml files.

    1. Shall I create query to generate XML file in SQL database and execute in QT using QSqlQuery?

    2. Shall I derect use XML class in QT to generate XML file (make sure the data I have to use from database)?

    which option would be easier in this case or if you can suggest me better option.

    Looking for your best advice.

    Thanks in advance....
    Last edited by sam123; 25th May 2016 at 13:30.

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: XML file generation using SQL database with QT

    Does your database support direct XML export?

    Cheers,
    _

  3. #3
    Join Date
    May 2016
    Posts
    17
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: XML file generation using SQL database with QT

    Thanks for reply.

    yes I am using Microsoft SQL server. I can write a query to generate xml file in my database.

    thanks

  4. #4
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: XML file generation using SQL database with QT

    Then that option sounds better to me than to pull values from the database and then generating XML.

    Cheers,
    _

Similar Threads

  1. Database in a file?
    By MTK358 in forum Qt Programming
    Replies: 11
    Last Post: 24th September 2010, 17:00
  2. Replies: 1
    Last Post: 20th September 2010, 16:49
  3. Replies: 9
    Last Post: 20th May 2010, 09:55
  4. Problem when using qmake for .vcproj file generation
    By Conel in forum Qt Programming
    Replies: 3
    Last Post: 4th December 2006, 14:27
  5. automatic generation of .qrc file
    By Lele in forum Qt Programming
    Replies: 3
    Last Post: 5th October 2006, 08:54

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.