Btrieve API

Btrieve API

Post by Manny Sanche » Fri, 08 Dec 2000 14:10:06



Hi all,

Our client has an app written in VB3, and they want to port it VB6.  The app
uses Btrieve 6.15 database and some 3rd party wrapper dll to the Btrieve
API.  The VB3 app makes function calls to this black box and data would be
comming out of its port holes.

The person who created the original app used embedded arays of UDT's in one
of the fields in one of the tables.  There is no way, that field will come
back from a SQL query as text.

My question is, is there a way, I can extract the data on that field intact
from a SQL query.  If not does anybody out there have some code, on using
the btrieve API to get all the records of the BTR files without using SQL?

Thanks,
Manny S.

 
 
 

Btrieve API

Post by g.. » Sat, 09 Dec 2000 00:13:34


If they used the Btrieve api then they had reference to the dll
wbtrcall.dll.  When you move to the 32-bit enviornment change it to
wbtrv32.dll.  Then of course you would also have to upgrade any of your
16-bit controls to the 32-bit versions and you should be able to port
it over.  If they used a 3-rd party DLL for the Btrieve API then you
may need to contact the original developers to get the 32-bit version.

Gil



Quote:> Hi all,

> Our client has an app written in VB3, and they want to port it VB6.
The app
> uses Btrieve 6.15 database and some 3rd party wrapper dll to the
Btrieve
> API.  The VB3 app makes function calls to this black box and data
would be
> comming out of its port holes.

> The person who created the original app used embedded arays of UDT's
in one
> of the fields in one of the tables.  There is no way, that field will
come
> back from a SQL query as text.

> My question is, is there a way, I can extract the data on that field
intact
> from a SQL query.  If not does anybody out there have some code, on
using
> the btrieve API to get all the records of the BTR files without using
SQL?

> Thanks,
> Manny S.

Sent via Deja.com http://www.deja.com/
Before you buy.

 
 
 

Btrieve API

Post by Manny Sanche » Sat, 09 Dec 2000 01:46:10


Thanks for the imput Gil.

Do you know where I can find a list of  function declarations for that
wbtrv32.dll?

I'd appreciate it.

Manny S.

 
 
 

1. Btrieve API woes (in Pervasive.SQL 2000, Btrieve 7.5)

Hi everyone,

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
(sp3).

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
three years.

        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
Integer

        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
Btrieve.

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.

Thanks,

Peter G Green
IT Manager

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)