ACC2: How to Retrieve Currency Data in Btrieve Files

Last reviewed: May 14, 1997
Article ID: Q114509
The information in this article applies to:
  • Microsoft Access version 2.0

SUMMARY

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.

MORE INFORMATION

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 : IsmBtrv kb3rdparty
Version : 2.0
Platform : WINDOWS
Hardware : X86
Issue type : kbhowto


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: May 14, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.