As i posted earlier, I think the statement:
QSqlQuery::lastQuery returned "SELECT stranka.SIFRA,stranka.DS,stranka.PRIIMEK,stranka.I ME,ulica.naziv,stranka.STEVILKA_ULICE,kraj.naziv_k raja FROM stranka,u"size=217
,which is created in method insertRecord is not correct.
Since I am total newbie in SQL, am I right or not?
It seems, but it is not logical, that method insertRecord does not create an SQL statment, but it should, as I understand the whole thing.
Or maybe, in the docs there is definition of method:
bool QSqlTableModel::insertRecord ( int [I
]row
[/I
],
const [URL
="http://www.qtcentre.org/forum/qsqlrecord.html"][COLOR
=#0000ff][U]QSqlRecord[/U][/COLOR][/URL] & [I]record[/I] )
bool QSqlTableModel::insertRecord ( int [I]row[/I], const [URL="http://www.qtcentre.org/forum/qsqlrecord.html"][COLOR=#0000ff][U]QSqlRecord[/U][/COLOR][/URL] & [I]record[/I] )
To copy to clipboard, switch view to plain text mode
The statement in my project is:
if(m_pTableModel->insertRecord(INSERT_RECORD_AT_END, cDataRecord))
if(m_pTableModel->insertRecord(INSERT_RECORD_AT_END, cDataRecord))
To copy to clipboard, switch view to plain text mode
cDataRecord is declared as:
QSqlRecord cDataRecord;
To copy to clipboard, switch view to plain text mode
As far as I can see, the second parameter is reference to sql record, but i pass like insertRecord(-1, cDataRecord), as seen earlier. Is this ok or not?
Bookmarks