hi all
im trying to insert a value into the table
but it did not insert the record rather, it shows an error,Qt Code:
if(db1.open()) { qDebug() << "database opened "; QSqlQuery query; query.prepare("insert into waitrequest (bednumber)""values(:bednumber)"); query.bindValue(":bednumber",10001); query.exec(); db1.close(); }To copy to clipboard, switch view to plain text mode
QSqlQuery:: prepare: database not open.
i checked the connection ,and it is present!!
can any one help me ??
thanks and regards
Bookmarks