PDA

View Full Version : QSqlRecord problem



Nefastious
15th October 2009, 15:37
Hi guys,

I have some trouble with the following: I want to get a couple of QStrings and put them into a QSqlRecord, the problem is, I am not sure on how to add fields to a record, I don't think the documentation is clear enough. In fact,


QSqlRecord patient;
patient.setValue("name", "Abel");

simply gives me an error: "aggregate `QSqlRecord patient´ has incomplete type and cannot be defined"

Any code samples would be appreciated.

Thanks in advance,

Nefastious :confused:

wysota
15th October 2009, 17:30
Did you #include <QSqlRecord>?