ACC2: How to Retrieve Currency Data in Btrieve FilesID: Q114509
|
Advanced: Requires expert coding, interoperability, and multiuser skills.
This article describes how to retrieve currency data stored in a Btrieve
database file that was created using Microsoft Visual Basic or Microsoft
Access without using the Microsoft Jet database engine.
An example of a Btrieve file that was created by Microsoft Visual Basic or
Microsoft Access without using the Microsoft Jet database engine might be a
file that was created using Microsoft Profit (an application developed with
Microsoft Visual Basic) and Btrieve to write directly to a Btrieve database
file without using the Microsoft Jet database engine.
Note that this information applies to any Btrieve file created using
Microsoft Visual Basic or Microsoft Access where Btrieve's WBTRCALL.DLL
file is called directly.
If Microsoft Visual Basic or Microsoft Access currency data is written to a
Btrieve file without using the Microsoft Jet database engine, the data is
automatically written in the Microsoft Visual Basic/Microsoft Access data
format. If that Btrieve file is then attached or imported in Microsoft
Access, and the field is defined in the FIELD.DDF file as Btrieve data type
6 (money), Microsoft Access will not display the correct results.
Microsoft Access expects the data to be in the Btrieve money format
(Btrieve data type 6), and attempts to translate the data from that format
to the Microsoft Visual Basic/Microsoft Access currency format. However,
the data is already in the Microsoft Visual Basic/Microsoft Access currency
format, so the translation procedure yields incorrect results.
To solve this problem, define the field in the FIELD.DDF file as an 8-byte
integer (Btrieve data type 1), with a length of 8. The Microsoft Jet
database engine will then be able to read the data and pass it through
without any translation.
NOTE: Not all .DDF file builders allow you to specify an 8-byte integer.
It may be necessary to use a different .DDF file builder, or to edit the
FIELD.DDF file with a hexadecimal editor after it is created.
Btrieve is manufactured by Pervasive Software, a vendor independent of
Microsoft; we make no warranty, implied or otherwise, regarding this
product's performance or reliability.
Keywords : kb3rdparty IsmBtrv
Version : 2.0
Platform : WINDOWS
Issue type : kbhowto
Last Reviewed: April 3, 1999