Solved

Btrieve "get Next Extended" and Error Code 2

Posted on 1998-09-15
2
633 Views
Last Modified: 2008-02-01
Hi Btrieve-Freaks!

we have observed the following odd phaenomenon:

Environment:
-2 server with Novell 4.11 and one with Novell 3.12
-several clients (WIN 3.11 and WIN 95)


At one of the "4.11" we have Btrieve 6.1 running, on the clients the corresponding requester. Our application (a WIN 16 Bit app) uses Btrieve. We are using Btrieve-Files with one internal index (autoincrement) and (as desired) several external indices.
To create external indices we are using extended operations:
to read the records "Get Next Extended" (Code 35) and to write the keyrecords
"Insert extended" (code 40): filling a buffer with the records, writing its key
and than fill the buffer again and so on.

On several 3.12 Networks this works fine even for large Btrieve-files
(i.e. more than 300 000 records). But in the configuration described above
we get after some secessfull "get next extended"/"insert extended" cycles
we receive suddenly Btrieve Error code 2 on the next "get next extended"
operation..
The number of sucessfull cycles depends seemingly on the length of the key
in question.

All ohter operations are working well.

We tried the following yet:

- Turn of all the servers but one 4.11
                  --> try --> error 2
- Copy the whole stuff to the 3.12, start btrieve on it
                  --> try --> error 2
- Turn off the Turbo FAT (turbodis.nlm from Novell)
                  --> try --> error 2
- checked, wether the Btrieve-file is corrupt in any sense
  by copiing the file to a network, where our app workes
  fine. On this other Network the problm does not appear
- Try several different options for
  btrieve.nlm and bspxcom.nlm
      --> try --> error 2
- Checked the drivers for the ethernet-cards on the  
  client-computers all are seemingly up to date and
  correct.

We have installed ethernet switches, but the problem behaves as before.

Any idea?
0
Comment
Question by:nmm
2 Comments
 
LVL 3

Accepted Solution

by:
brosenb0 earned 400 total points
ID: 1593431
A Btrieve MicroKernel status code 2 is disk I/O related and in no way is affected by communications infrastructure.

Here are the causes of this error: -

1) The file is damaged, and you must recover it.  Use BUTIL -RECOVER & -LOAD.

2) In NetWare, at least one MicroKernel data file is flagged as Shareable. All
MicroKernel data files should be flagged as Non-Shareable. The MicroKernel is
the only user that accesses the files (on behalf of many users). As the only user,
the MicroKernel can control the integrity of the data files. If you flag your
MicroKernel data files as Shareable, data corruption can occur.

3) For pre-v6.0 data files, there is a large pre-image file inside a transaction, and
there is not enough disk space for a write to the pre-image file.

4) For pre-v6.0 data files, there is one pre-image file for multiple data files. For
example, if you name the data files CUSTOMER.ONE and CUSTOMER.TWO,
both files have pre-image files named CUSTOMER.PRE.

5) For pre-v6.0 data files that are larger than 768 MB, there is a conflict among
locking mechanisms. The file has not been corrupted. Your application can retry
the operation until the conflict is resolved (when the competing application
releases the lock your application requires).

6) A pre-v6.0 Btrieve engine attempted to open a v6. x or later MicroKernel file.

At the bare minimum consider upgrading your Novell Btrieve v6.1 to Pervasive Btrieve v6.15.  Pervasive SQL is even better as it contains Btrieve v7.0 which is significantly enhanced.  Btrieve v7.0 can handle up to 16GB data files (it auto-creates extension files if the OS file size limit is reached), performs up to 20x faster at the server and provides system enforced transactions.  There are many other features to numerous to list.  Check out www.pervasive-sw.com.

You mentioned you are using NW4.11.  A common trap for young players when moving a Btrieve app to 4.11 is the OS file size limit.  This may or may not be related to your problem but worth a mention to save you the heartache. NW 3.x has a file size limit of 4GB.  NW 4.11 also has a file size limit of 4GB, however, only if block suballocation is turned off.  This is not the default scenario when creating a volume as the optimum configuration for I/O performance, without wasting big chunks of disk space on small files is 64KB blocks with suballocation.  Suballocation "scavanges" parts of blocks that were previously allocated but not fully utilized for further allocation.  With sub-allocation turned on the file size limit is reduced to 2GB.  Versions of Btrieve prior to v7.0 do not create extension files and as such may be impeded by the OS file size limit.  You can only disable block suballocation when the NetWare volume is created.

Good Luck.
0
 

Author Comment

by:nmm
ID: 1593432
Hi brosenb0,
the btrieve-Files in question where created with btrieve 6.15
and the error occured in a 6.10 envronment.
There are a short remark in the btrieve 6.15 programmers manual, that the autoincrement-feature has been improved in 6.15

So we suppose now, that the 6.15 "look" damaged for the 6.10 btrieve.

We will upgreade at least to 6.15...


0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Owning a franchise can be the dream of a lifetime. It provides a chance for economic growth. You can be as successful as you want.  To make your franchise successful, you need to market it successfully. Here are six of the best marketing strategies …
In this article, I will show you HOW TO: Install VMware Tools for Windows on a VMware Windows virtual machine on a VMware vSphere Hypervisor 6.5 (ESXi 6.5) Host Server, using the VMware Host Client. The virtual machine has Windows Server 2016 instal…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now