SQL TABLES USING QT
-
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). -
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.
-
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 .. :) -
So you would parse the packet content and create/fill a table with the various field contained in that packet ?
-
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 .
-
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 ?
-
well this is something related with packet fragmentation.. and i have to keep record of all the packets sent..
-
Then it would be more logic to store each packet in a row of a dedicated table.
-
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
-
You can use the QtSql mode, the SQLite driver is built by default.