[Qt-interest] Qt and databases explanations for a beginner

Cimpean Andrei Sebastian andreiamenta at gmail.com
Fri Aug 21 19:29:50 CEST 2009


Thank you everybody for the help and time it really helped me figure 
things out. It is very easy and the part i didn't get from start is know 
clear because of your help. Thank you very much.
> Am Mittwoch, 19. August 2009 schrieb Cimpean Andrei Sebastian:
>   
>> Hello Martin, i think you didn't understand my question or i failed to
>> explain my problem in an efficient way. I want to have as many SQLite
>> databases, stored locally, that i can open with my Qt developed
>> application. This means that i will probably have a something.sql that i
>> will open and perform operations on it like query and so on. My question
>> was, how do you that with Qt, you just put a sql file somewhere and use
>> it? or you create it from code? that was my problem. in a way i advanced
>> in finding out but until now unfortunately this part is still not
>> resolved. Everybody tried to help and i am very grateful for that, but i
>> just can't figure out how to do that part with the sql file. I'm sure
>> it's very simple but... you know, mostly the things you're searching for
>> are right in front of you. Thank you for your intervention and if you
>> have any more ideas or can give me some hints with my problem I'd
>> greatly appreciate it.
>>     
> I guess to have to open the database object (see 
> http://doc.trolltech.com/4.5/qsqldatabase.html#details)
> with the new database name and then execute your sql statements as in
> http://doc.trolltech.com/4.5/qsqlquery.html#exec
>
> if you open a non existing database it will be created automagically (see 
> http://sqlite.org/c3ref/open.html)
>
> it is your decision to code all sql statements as c++ constant strings or to 
> read sql staments from a text file...
>
> Greetings
> Martin
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>   

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090821/2ebd4200/attachment.html 


More information about the Qt-interest-old mailing list