Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. SQL TABLES USING QT

SQL TABLES USING QT

Scheduled Pinned Locked Moved General and Desktop
10 Posts 2 Posters 2.2k Views 1 Watching
  • 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.
  • H Offline
    H Offline
    harvaneet
    wrote on last edited by
    #1

    Hi!!
    I am new to QT and I am working on a project wherein I have a packet consisting of various fields (similar to TCP packet).
    Now i want to store this packet in the form of SQL table in qt.
    The fields are already filled just have to store this packet (NO EDITING IN THE SQL TABLE).

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      Do you mean that you have the complete table in your packet and just want to create it in your DB ?

      Please don't use all caps sentences, in written language it's considered shouting and not very polite.

      Also, it's Qt, QT stands for Apple QuickTime.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      H 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi and welcome to devnet,

        Do you mean that you have the complete table in your packet and just want to create it in your DB ?

        Please don't use all caps sentences, in written language it's considered shouting and not very polite.

        Also, it's Qt, QT stands for Apple QuickTime.

        H Offline
        H Offline
        harvaneet
        wrote on last edited by
        #3

        @SGaist

        Yes similar to this only. Actually I just want to store my filled packet in the database in a tabular form ..
        N the rest that you have mentioned, I will surely take care of that .. :)

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          So you would parse the packet content and create/fill a table with the various field contained in that packet ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • H Offline
            H Offline
            harvaneet
            wrote on last edited by
            #5

            yes.. and every time I have to create a table whenever there is a packet to send. Another point that is to be considered, is that all the previous tables should be stored in the database only.. overwriting should not be done .

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              Sounds a bit counter intuitive to generate new tables rather than adding data to an existing table.

              Why do you need new tables each time ?

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • H Offline
                H Offline
                harvaneet
                wrote on last edited by
                #7

                well this is something related with packet fragmentation.. and i have to keep record of all the packets sent..

                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  Then it would be more logic to store each packet in a row of a dedicated table.

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  0
                  • H Offline
                    H Offline
                    harvaneet
                    wrote on last edited by
                    #9

                    okk .. well have got some clue for this on google .. they have mentioned the use of SQLite.. now how can i use sqlite with qt and the important part of all this is that, the project in actually a dll project (i.e c project) and have to use sqlite within this dll

                    1 Reply Last reply
                    0
                    • SGaistS Offline
                      SGaistS Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on last edited by
                      #10

                      You can use the QtSql mode, the SQLite driver is built by default.

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      0

                      • Login

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