QSqlCursor sCur("server",true,MyPSQL); QSqlRecord *buffer; buffer = sCur.primeInsert(); // запись для вставки buffer->setValue("id",NULL); buffer->setValue("name",QString("Анаконда28")); buffer->setValue("help","---------???-------"); int j=sCur.insert();
QSqlQuery sql(MyPSQL); bool ii=sql.exec("INSERT INTO server VALUES(NULL,1,2,3,4,5,6)");
SQLINSERT INTO server VALUES(NULL,1,2,3,4,5,6)
SQLINSERT INTO server (colum1,colum2,colum3,colum4,colum5,colum6) VALUES(1,2,3,4,5,6))
C++ (Qt)buffer->setValue("id",QVariant ());