Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to access to dbf file in QT ?
Forum Updated to NodeBB v4.3 + New Features

How to access to dbf file in QT ?

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 4.5k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Arturs
    wrote on 10 Jun 2016, 07:27 last edited by
    #1

    Hi

    How to access to dbf file in QT ?

    System: Windows 7

    Regards
    Artur

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mrjj
      Lifetime Qt Champion
      wrote on 10 Jun 2016, 07:30 last edited by mrjj 6 Oct 2016, 07:55
      #2

      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=13255

      but I have not tested newer version if still in there (dbase).
      pretty old now. :)

      1 Reply Last reply
      3
      • A Offline
        A Offline
        Arturs
        wrote on 10 Jun 2016, 12:42 last edited by
        #3

        Thank you for so precise description.

        Everythng works :)

        1 Reply Last reply
        1
        • M Offline
          M Offline
          mrjj
          Lifetime Qt Champion
          wrote on 10 Jun 2016, 12:45 last edited by
          #4

          Super
          dbase will never die! ;) (it seems)

          1 Reply Last reply
          1

          1/4

          10 Jun 2016, 07:27

          • Login

          • Login or register to search.
          1 out of 4
          • First post
            1/4
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved