Jay
Jay

Reputation: 66

How to open large DBF Files (6GB) in Lazarus/Pascal

I am new here and this is my first post. So here goes my question: I created an application to import data from DBF/CSV/TXT files to a MySql Database. Everything works perfect, except when I select a DBF file larger than 3GB of size. I am using the TDBF component for Lazarus 1.4.0 (FPC 2.6.4). I also tried the Devart UniDac component suite with no luck. So, does anyone know of a component/library/way, free/paid, which I can use to perform this task directly in my application?

P.S.: I know for sure that those tables are working and NOT corrupted, because I can open them via a software called DBFView (www.dbfview.com). But I need to import these files through my application.

Upvotes: 1

Views: 1762

Answers (1)

MartynA
MartynA

Reputation: 30745

The standard ODBC set-up on Windows (Win7 and earlier at least) includes a dBase driver. So, try:

  • Setting up an ODBC DSN for your dBase files

  • Accessing it via the FPC/Lazarus equivalent of Delphi's TAdoQuery in your project, if there is one.

The point, of course, of trying this way is that it avoids the need to use a DBF-specific dataset component in your project.

PS Try rephrasing your question so that it asks how to access dBase files without using a 3rd-party library. Might attract fewer "off-topic" objections then.

Upvotes: 0

Related Questions