1. Btrieve API woes (in Pervasive.SQL 2000, Btrieve 7.5)
I have a huge number of applications which have been written with the
6.15 Btrieve API as the underlying transactional database. I'm doing a
quick check/study of the upgrade problems when I go (if I ever do) to
Pervasive.SQL 2000. I've downloaded the PSQL 2000 SDK and installed the
workgroup engine and the SDK.
The first problem was that the 6.15 SDK was interfering with the PSQL
installation because the wbtr32.dll was the old 6.15 version in the
\system directory of win98. Fixed that by copying the complete contents
(20Mb) of the \bin directory (from PSQL) into the \system directory of
win98 (yes I know it's crude but it works OK :)
Now, the main problem is that when I try to run the app which runs
perfectly well in 6.15, under Btr 7.5 I get the splash screen
(pervasive.SQL 2000) and then I get a "Illegal operation" from VB6
I check the interface code and guess what I find: (note that in VB6,
there is a DEFLNG A-Z in all modules, this forces all unspecified
variables or parameters to be Long Integers (32 bit) which makes sense
in a 32 bit environment.
This is the function declare as I have it in my applications (6.15).
Public Declare Function BTRCALL Lib "wbtrv32.dll" (ByVal op, ByVal Pb
As String, Db As Any, DL As Long, Kb As Any, ByVal Kl, ByVal Kn) As Long
This is how it is from the 6.15 intf docs.
public Declare Function BTRCALL Lib "wbtrv32.dll" (ByVal op, ByVal Pb$,
Db As Any, DL As Long, Kb As Any, ByVal Kl, ByVal Kn) As Integer
As you can see, this is they are more or less identical, I changed one
or two things for appearences' sake but this has worked fine for over
Now along comes P.SQL 2000 with:
Public Declare Function BTRCALL Lib "w3btrv7.dll" (ByVal op, Pb As Any,
Db As Any, DL As Integer, ByRef Kb As Any, ByVal Kl, ByVal Kn) As
which not only changes the DLL file, but also materially affects the
layout and structure of the procedure call. Integers (16 bit) instead
of Longs (32 bit)
WHY ??????? This means I'm going to have to rewrite every single
call to Btrieve I make in my apps. To be honest, that is something that
I am NOT prepared to do as there are literally thousands of calls to
Is there a workaround to allow the same code (BTRCALL and procedure
definitions) to work with PSQL 2000. I'm going to keep trying, but I
don't hold out much hope. I had the same problem when I went from 16
bit windows 3.1 and btr 6.15 to 32 bit windows and btr 6.15.
Peter G Green
2. Links about DB2 for OS/390
3. Transactions and locking with Btrieve API
4. Accessing Approach with VB3?
5. Btrieve API - Requester or Local?
6. Btrieve V2 - Blast from the past
7. VB6.0 Btrieve API
8. Accessing w/ ROWID vs using INDEX
9. VB 6, Btrieve API and error 3 on opening a file
10. vb6.0 & Btrieve API
11. Btrieve API Integer Field
12. Oervasive SQL200i and btrieve API
13. Newbie: Btrieve API (Wbtrv32.dll)