Well, i got the statement:
QSqlQuery::lastQuery returned
{"SELECT stranka.SIFRA,stranka.DS,stranka.PRIIMEK,stranka.IME,ulica.naziv,stranka.STEVILKA_ULICE,kraj.naziv_kraja FROM stranka,u" size
=217}
QSqlQuery::lastQuery returned {"SELECT stranka.SIFRA,stranka.DS,stranka.PRIIMEK,stranka.IME,ulica.naziv,stranka.STEVILKA_ULICE,kraj.naziv_kraja FROM stranka,u" size=217}
To copy to clipboard, switch view to plain text mode
from the code:
cDataRecord.
setValue(QString("SIFRA"), m_pUpdateWindow
->GetCustomerID
()->text
());
cDataRecord.
setValue(QString("DS"), m_pUpdateWindow
->GetTaxNumber
()->text
());
cDataRecord.
setValue(QString("PRIIMEK"), m_pUpdateWindow
->GetSurname
()->text
());
cDataRecord.
setValue(QString("IME"), m_pUpdateWindow
->GetName
()->text
());
//cDataRecord.setValue("ULICA", m_pUpdateWindow->GetStreetID()->text());
cDataRecord.
setValue(QString("STEVILKA_ULICE"), m_pUpdateWindow
->GetStreetNumber
()->text
());
cDataRecord.
setValue(QString("POSTA_STEVILKA"), m_pUpdateWindow
->GetZipCode
()->text
());
if(m_pTableModel->insertRecord(INSERT_RECORD_AT_END, cDataRecord))
{
{
qDebug() << m_pTableModel->query().lastQuery();
} // if
} // if
QSqlRecord cDataRecord;
cDataRecord.setValue(QString("SIFRA"), m_pUpdateWindow->GetCustomerID()->text());
cDataRecord.setValue(QString("DS"), m_pUpdateWindow->GetTaxNumber()->text());
cDataRecord.setValue(QString("PRIIMEK"), m_pUpdateWindow->GetSurname()->text());
cDataRecord.setValue(QString("IME"), m_pUpdateWindow->GetName()->text());
//cDataRecord.setValue("ULICA", m_pUpdateWindow->GetStreetID()->text());
cDataRecord.setValue(QString("STEVILKA_ULICE"), m_pUpdateWindow->GetStreetNumber()->text());
cDataRecord.setValue(QString("POSTA_STEVILKA"), m_pUpdateWindow->GetZipCode()->text());
if(m_pTableModel->insertRecord(INSERT_RECORD_AT_END, cDataRecord))
{
QSqlError error=m_pTableModel->lastError();
if(error.type()!=QSqlError::NoError)
{
qDebug() << m_pTableModel->query().lastQuery();
} // if
} // if
To copy to clipboard, switch view to plain text mode
There is no INSERT statement at all, what the heck is going on??
Bookmarks