QSqlDatabase dbfdb = QSqlDatabase::addDatabase("QODBC", "dbfcon");QString dbfDriver;dbfDriver = "DRIVER={Microsoft dBase Driver (*.dbf)};FIL={dBase IV;};DefaultDir="+dbfDirPath;dbfdb.setDatabaseName(dbfDriver);dbfdb.open();return dbfdb.isOpen();
QString queryText ="SELECT CAST(N_KMS AS INT) FROM TABLENAME"query.exec(queryText);
QString queryText ="SELECT CONVERT(INT, N_KMS) FROM TABLENAME"query.exec(queryText);