From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to read/write Btrieve database (.dat file) from Btrieve Ver. 6.15 / WBTRV32.DLL ?

How to read/write Btrieve database (.dat file) from Btrieve Ver. 6.15 / WBTRV32.DLL ?

We have old Btrieve database i.e., .dat files which are generated from the old dos-based Magic 386 Ver 5.02c

There are several .dat files for which the database structure (fields with datatypes) are seen in the old dos-based Magic application.

 

One try to read data was success - The method was designed and developed code in Visual Basic (VB) to read using WBTRV32.DLL. Generated DLL and used this DLL in the LabVIEW VI defining the structure and access point in LabVIEW. Ofcourse data parsing is required to be done, but alongwith spaces are also removed. The write looks difficult task here in this case.

VB Out = String, LV In = String, converted further to 2d array. The formatting based on the separator.

 

The requirement is future changes keeps on coming changing the table structure and new fields. And its difficult to keep on modifying 2 source code for changes.

 

However we still could not locate to read/write this Btrieve (.dat) files directly from the LabVIEW, accessing the WBTRV32.dll or some other means?

We also could not locate the header file for the WBTRV32.dll to feed in the Import Shared Library for DLL?

 

The attached Btrieve (.dat) file (included in zip file) is what we are trying to read/write, for which the structure is also attached.

 

Download All
0 Kudos
Message 1 of 6
(7,473 Views)

Can you tell me what version of LabVIEW you are using and what Operating System you are working on?

Rachel P. | Applications Engineer | National Instruments
0 Kudos
Message 2 of 6
(7,401 Views)

LabVIEW  2014

OS: Windows 7 (32-bit and 64-bit)

0 Kudos
Message 3 of 6
(7,395 Views)

If your issue is with just read and writing to a .dat file then here is another discussion thread that may be helpful:

 

https://forums.ni.com/t5/LabVIEW/Need-to-process-a-dat-file-using-LabVIEW/m-p/967344#M433693

 

You should also be able to read your .dat file using the Read from Binary File VI as seen here:

http://digital.ni.com/public.nsf/allkb/A45A757C14D3421986256BEA006C547A

Rachel P. | Applications Engineer | National Instruments
0 Kudos
Message 4 of 6
(7,335 Views)

The Btrieve database (.dat files) are NOT the Datalog (.dat) files generated from LabVIEW. I tried accessing through the functions you are suggesting i.e., Binary Text File, Text file, Datalog files, etc. by using different datatypes as String, 1DArray, 2DArray, etc. It could NOT read any data. Instead generate error of could not recognize file.

 

They are the Btrieve database files defined and generated from old dos-based Magic Application

- Magic 386=Ver 5.02c (Magic Software Enterprises Ltd.)

- Btrieve Database=Ver 6.15

- File Access=Novell

 

The other alternative what I see is, could be more information about accessing WBTRV32.DLL in LabVIEW. I could NOT locate the header file (.h) to import in the LabVIEW - Tools - Import  - Shared library (.dll). For which the "W32MKDE.EXE" is the "Microkernel Database Engine Version 6.15"

Attaching the DLL and engine in zip format here.

0 Kudos
Message 5 of 6
(7,315 Views)

ManishKSoni wrote:

 

The other alternative what I see is, could be more information about accessing WBTRV32.DLL in LabVIEW. I could NOT locate the header file (.h) to import in the LabVIEW - Tools - Import  - Shared library (.dll). For which the "W32MKDE.EXE" is the "Microkernel Database Engine Version 6.15"

Attaching the DLL and engine in zip format here.


There seems to be no .h header file for. All I saw on the net were various Basic definitions. And the header file wouldn't really help you much. The entire API seems to be routed through a single exported function, which makes accessing this without both a good understanding of the Btrieve database interface and the particular datamodel used by your application pretty impossible. Unfortunately the various Basic files don't all agree on the exact type. That could be because some are for VB and others are for other more obscure Basic variants but it makes even understanding the datatypes of that single function pretty hard.

 

Seems like I found something here.

 

 

Rolf Kalbermatter
My Blog
0 Kudos
Message 6 of 6
(7,294 Views)