How to access to dbf file in QT ?
-
Hi
DBF is a file format typically used by database software. DBF stands for DataBase File. DBF files were originally used in dBase II and continued through to dBase Version IV. The DBF file format originated by Ashton-Tate, but is understood by Act!, Clipper,FoxPro, Arago, Wordtech, xBase, and similar database ordatabase-related products.
DBF files can also be opened by Microsoft Excel and Microsoft Access.
So what type of dbf are you talking?
In windows there is driver via ODBC for dbase
QSqlDatabase db = QSqlDatabase::addDatabase("QODBC");
db.setDatabaseName("Driver={Microsoft dBASE Driver (*.dbf)};DriverID=277;Dbq=/path/to/database");
db.open(); // Ok
QSqlQuery query = QSqlQuery("select * from table", db);ps. the driver normally comes with Access.
It used to be avialable in
https://www.microsoft.com/en-us/download/details.aspx?id=13255but I have not tested newer version if still in there (dbase).
pretty old now. :) -
Super
dbase will never die! ;) (it seems)