hi
im unable to insert a record into the table but im able to execute the select
query..i checked ,the db connection is true..
Qt Code:
  1. QSqlDatabase db1=QSqlDatabase::database("ganesh");
  2. if(db1.open())
  3. {
  4. qDebug()<<"connection ok";
  5. QSqlQuery query;
  6. query.exec("insert into waitrequest(bednumber)values('123')");
  7. }
To copy to clipboard, switch view to plain text mode 
but it shows message like below...
QSqlQuery:: exec: database not open
but if i use select query i get the result!!.
any help is highly respected!!
thanks...