JeanC
15th February 2008, 10:48
Hello,
Don't know what happens here, it's just a plain litte table.
The error msg is: "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'index, ip, name, pass FROM members' at line 1 QMYSQL: Unable to execute query"
It's the only table that produces this error.
QSqlQuery on it works and shows the content.
db = QSqlDatabase::addDatabase("QMYSQL");
db.setHostName("192.168.1.10");
db.setDatabaseName("iris");
db.setUserName("me");
db.setPassword("pass");
if (!db.open())
setWindowTitle(db.lastError().text());
model = new QSqlTableModel;
model->setTable("members");
if (!model->select())
qDebug() << model->lastError().text();
Don't know what happens here, it's just a plain litte table.
The error msg is: "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'index, ip, name, pass FROM members' at line 1 QMYSQL: Unable to execute query"
It's the only table that produces this error.
QSqlQuery on it works and shows the content.
db = QSqlDatabase::addDatabase("QMYSQL");
db.setHostName("192.168.1.10");
db.setDatabaseName("iris");
db.setUserName("me");
db.setPassword("pass");
if (!db.open())
setWindowTitle(db.lastError().text());
model = new QSqlTableModel;
model->setTable("members");
if (!model->select())
qDebug() << model->lastError().text();