QSqlQuery* qsqQuery=new QSqlQuery();qsqQuery->prepare("INSERT INTO table (ID) VALUE (:ID);")qsqQuery->bindValue(":ID",iID);qsqQuery->exec();QMessageBox::critical(this, "",qsqQuery->lastQuery());QMessageBox::critical(this, "",qsqQuery->executedQuery());
CREATE TRIGGER DOC_STATUS_BI FOR DOC_STATUSACTIVE BEFORE INSERT POSITION 0asbegin if (new.ID is null) then new.ID = gen_id(GEN_DOC_STATUS_ID, 1);end