Can I ask you some personal questions?
How old are you? Is this homework?
Getting information out of a sql database is very easy. There are millions, if not billions of articles on google. Let me give you one:
http://www.w3schools.com/sql/default.asp
As for using sql queries with Qt:
http://doc.qt.nokia.com/4.6/qsqlquery.html
Now, read those pages and if you still have a question, please ask.
Thanks tbscope for ur childish reply. But let me tell you that first of all i have no idea of sql database or sql language. I have begun directly from Qt.
Secondly, the link that you have provided: http://doc.qt.nokia.com/4.6/qsqlquery.html, i have already gone through those pages. But there i find so many functions declared but so less explanation, that i really get confused as to which one to use and which one not to. That's why I seek out help in this forum to know the basic syntaxes as Qt is completely new to me. So if you have any links where explanations are also there regarding the predefined functions, then do send me. That could really help me. Now i hope you understand my problem rather than my age.
Thanks for your concern.
The solution for your problem is well described in the Detailed Description of QSqlQuery (Or have a look at the examples of the QtSql Module). What else do you need to know? Also it would be nice if you could show us what you have so far.
And the question if it is your homework was because we have the rule here, not to post solutions for homework. So you won't see any piece of code here! Also if you post some we can correct.
sattu (23rd September 2010)
Well that's fine! I didn't know about that rule. Actually it's difficult to tell how much i have learnt upto now. I think the more i get used to Qt, the more i will find it understandable. So let me wait for time. If i have any doubt or error in code i could surely ask for it. But if i don't find any required syntaxes then i think i just need to keep on searching for it. O.k thanks once again.
With regards,
You need to have at least basic knowledge of SQL to use QtSql module. It is like using Qt without having knowledge of C++. But as your need is very simple, just go through the example programs provided with Qt. I m sure the examples will show u the way.
sattu (23rd September 2010)
Bookmarks