Btrieve error codes

When a Btrieve error appears in Scala, two Btrieve error codes are shown. Error code 1 tells you what Scala was trying to do when the error occurred (read from a file, write to a file, open a file e.t.c.). You can find a list of these error codes below. However, normally this error code is of little concern. Error code 2 is the Btrieve-specific error code, where you can find the explanation in the Btrieve manual. Below, we have tried to give you some other hints concerning different kinds of error code 2.

Error code 1

Error code Explanation
0 Successful Call
-1 EOF/Key not Found
-2 File not found
-3 Max Files Exceeded
-4 Close Error
-5 Create Error
-6 Open Error
-7 Set Owner Error
-8 File Not Open
-9 Read Error
-10 Write Error
-11 Delete Error

 Error code 2

NOTE!! Editing the registry should only be done by an experienced system engineer.
Below are listed some of the common error codes that Scala may return. Scala often returns two error messages the first is the internal scala error code, the second is the Btrieve error code. The links below are for Btrieve error codes.

Status 2 Status 11 Status 20 Status 35 Status 46       Status 80 Status 91
Status 3 Status 12             Status 85 Status 94
Status 5 Status 14               Status 95
  Status 18               Status 97
                  Status 99

Status 2

This status code indicates that the MKDE encountered an error writing to or reading from the disk.

  • Make sure that the READ ONLY attribute is not set on the files in question. This can be done from a DOS prompt by typing:attrib -r *.* /s from the scala root directory.

  • check that the server volume is not full. Scala often creates temporary files, and it could be a case of insufficiant disk space

  • Try to rebuild the indexes.

Return to top

Status 3

This status code indicates that the operation cannot continue because the file is not open. This could be the result of a network communication problem.

  • The session could be dropped without Scala knowing it, you would then get this error.

  • For more details see error 95.

Return to top

Status 5

This status code indicates that the MKDE cannot update the record because the record has a key field that contains a duplicate key value.

  • Try to rebuild the indexes.

  • Contact Scala support

Return to top

Status 11

This status code indicates that the file name specified does not conform to the file-naming conventions.

  • Ensure that you have sufficiant rights on the network

  • If you tried to create files in the system utility in a module that the customer did not buy, the directory won't exist.

  • The first thing to check is, if you are running win95, that there is not a line with lastdrive=Z in your config.sys

  • If this does not solve your problem, see the status 95 section.

Return to top

Status 12

This status code indicates that the file that you are trying to open does not exist.

  • Make sure that you have filescan rights to the directory on the server.

  • Check to see that the file actually exists, it could be that the file has not been created yet, as is often the case with a new installation.

  • If you are running a Netware server, try to patch your server so that you have the latest clib.nlm version.

  • If this does not solve your problem, see the status 95 section.

Return to top

Status 14

This status code tells you that there is insufficiant disk spae on the server to create a pre-image file.

  • Check the amount of free space on the scala volume.

  • Ensure that the user has create rights to all directories in scala.

Return to top

Status 18

Disk is full

  • This status code is pretty self explanitory

Return to top

Status 20

Status Code 20, 'The MicroKernel or Btrieve Requester is inactive/Btrieve Record Manager is inactive', indicates either a configuration problem at the workstation level or a communication problem between the server and the client machine.

  • If error code 20 appears immediately, make sure the client is installed as described in the installation document, also ensure that there are not any copies of different versions of DLLs or of network access stacks (winsock ) in the path.
  • If you have a dial up adapter installed, try to uninstall it and see if it solves your problem.
  • Status Code 20 with a delay indicates a communication problem.
  • Uninstall the Scala client by going into control panel/add-remove programs. Reinstall the client from a mapped drive. example: F:\scala\client\setup.exe.
  • Bindery problem with NW 4.10:

In a NetWare 4.10 environment, there is an issue with a bindery problem where BSPXCOM receives the wrong address from NetWare. BSPXCOM does not detect this, and sends out the incorrect address in its SAP packets, resulting in incorrect information in the bindery. Consequently, the workstation requesters get the wrong server address out of the bindery and are unable to communicate - resulting in a Status Code 20 (or Status Code 91).

Patch the server and workstation as described in the document Installing Btrieve for Scala.

  • Multiple NIC (Network Interface Cards):
    A routing problem between multiple NICS can cause Status Code 20. To isolate the problem where Btrieve is returning a Status Code 20 from the workstation and multiple network interface cards are in the server (which is configured for SPX):

    Connect the workstation into NET1 and disconnect NET2 NIC in the server.

    Reboot the workstation and run the application to test Btrieve.

    Perform the same with NET2 while NET1 disconnected. If the application runs successfully, then it is a network routing problem, not a Btrieve issue.

    The network administrator will have to check routing configurations for the particular network.

  • NT 4.0 with SP 3:

    Service Pack 3 for NT 4.0 seems to have a problem with IPX/SPX communication, generating a Status Code 20, breqnt-10, and other communication Status Codes and messages.

    Microsoft suggests to use the REGEDT32.exe tool and navigate to the following location:

    HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters\

    Add the following value:
    Value Name: MinClientBufferSize
    Data Type: REG_DWORD
    Data: 500
    Radix: Decimal

    Microsoft has a hot fix for this.
  • Winsock.dll and wsock32.dll:

    For a TCP/IP stack the original version of Winsock.dll and wsock32.dll should be used. Another version can cause Status Code 20.
    winsock.dll version 4.00.950 works
    wsock32.dll version 4.00.951 works

TIP

Status Code 20 From Windows NT/95 Workstations to Btrieve for NT Server:

Run "ipxroute config" from a DOS prompt on the server and then run the same command from the workstation. They have to be the same for a specific frame type. The network number for each frame type must be the same on network devices connected to the same segment. If not, change the network number in the workstation to match the server.

Return to top

Status 35.

This status code indicates that the application encountered a directory error.

  • NT server:

    Check the file sy000000.dat in the root directory of Scala, the directories quoted here must be relative to the Scala root. The path name may not start with a backslash( \ ).

  • NetWare:

    The path must be given to a mapped path. UNC conventions do not work. eg d:\scala\hlp\gl and not \\servername\volumename\directory.

Return to top

Status 46

Access to the requested file is denied.

  • User does not have read/write access to the file

  • The file is flagged read only. Go to a DOS prompt and in the Scala directory type "attrib -r *.* /s". This will remove any read only attributes on any of the Scala files. NOTE: this does not effect network rights.

Return to top

Status 80

The microkernel encountered a record level conflict

  • Contact Scala Support

Return to top

Status 85

The file is locked.

  • See to it that all the windows requesters are set to Requester=yes Local=no

  • If there is a workstation that has hung while running Scala, reboot it and run a Scaclear.

Return to top

Status 91.

The Requestor cannot establish a session with the server.

  • Check to see that the Btrieve server is actually running

  • Use the Btrieve monitor on the server to see that you have not reached your maximum limit of remote connections

  • If you are using the IPX/SPX protocol, make sure that the internal IPX network address on each NT Server is unique. The default is 00000000 and if you have more than one server, this could cause routing problems. To check this setting go to control panel\network\protocols\NWlink IPX compatible transport. On this screen there is a field called internal network number. This number MUST be unique on each machine. The external network number must be the same for all servers on the same network.

Return to top

Status 94.

The fastest and easiest way to troubleshoot Status Code 94 is to isolate the cause by process of elimination. Start by asking a few simple questions like:

*"Does it occur for every user?,"
*"Does it occur on every workstation?," and
*"Does it occur for every user on every workstation?"

Because the Status Code 94 is a permission error, these questions will narrow down the cause.

  • If certain users get the error on any workstation, that indicates those users permissions or network attributes are the cause.
  • If one or only a few workstations are getting the error, then the cause is probably configuration workstations.
  • If the problem occurs for every user on every workstation, that indicates the problem is most likely at the server level.
  • Things to look at
    • Network Attributes:
      Regardless of operating systems involved, the following guidelines apply:
      • The user name should NOT be "Admin" or "Supervisor," and the password should not be left blank.The user should also have read/write access to all the Scala files.. Files being accessed must be flagged for read/write access. Once these two things are done and verified, you have eliminated network rights as being the problem for Status Code 94.
    • Workstation Attributes

      If any user gets Status Code 94 on one or a few workstations and those same users do not get the error on other workstations, that indicates component (.dll or .exe) may be incorrect. To investigate this you can download the Scacheck utility from this web page. You could also compare the setup and version of Btrieve with workstations that are working.
    • NT Server

      Btrieve runs as a service under NT server. By default, these services use the 'System' user. So, in addition to the network users having permission to the directories where the files being accessed reside, the 'System' user must also have 'full control' permissions. When installing NT, you have the option to give the 'System' user rights automatically to all files or have the administrator specify them. You should consult your NT documentation for specifics on the 'System' user. However, if   'System' does not have permissions under NT, the server returns a Status Code 94.

      NT has a utility called Security Auditing that may be useful if the server is suspected as being the cause of returning Status Code 94. Both users and/or directories can be audited. The audits can them be reviewed and should provide information on what permissions need to be adjusted to resolve Status Code 94. Specifics on auditing can be found on NT help or documentation.
    • NetWare (NDS)
      • The bindery context on the server where Btrieve is running MUST have a Read/Write replica of the partition of the container object for which the bindery context is set.
      • The user MUST exist in the container object for which the bindery context is set.
      • The Btrieve object must exist. This can be accomplished using the Btrieve Setup Utility (BSETUP.NLM), which adds a LOAD BDIRECT line to the BSTART.NCF.
      • The bindery context should be set to what is was when the users and objects were added. If the bindery context changes, the users and objects made need to be removed and added again under the new context.
      • When using the 32-bit Btrieve Requesters for Windows NT/Windows 95, a Status 94 is returned from the Novell server.
        This is because the 32-bit requester always uses the username used to log in to the preferred server or into the workstation to verify whether or not the client has the proper rights to access the Btrieve files on the targeted Btrieve server. You must ensure that the username you use to log in to your workstation or into the preferred server exists on the Btrieve server, and the username has the appropriate rights to access the files.
      • If Limit Concurrent Connections is set to Yes and Maximum Connection is set to 1 on a Novell Server using the Account Restriction Option , the requester returns Code 94 to the application. The Maximum Connection must be set to at least 2. The reason for this behavior is the 32-bit Btrieve Requester uses the NetWare Runtime Support. Therefore, the MicroKernel Database Engine performs a login using the username and password passed to it via the 32-bit Btrieve Requester. This means the user must have permission to at least two concurrent logins to the NetWare server. You can also check to see if the same username is logged in elsewhere

Return to top

Status 95


This error indicates that a previously established session is no longer active. Verify that the connection still exists.To do this see if you can still read or write to files on the server. If does not work, you have been dissconnected from the server for some reason. If you are still attached, the following may help you.

  • TCP/IP timeout errors On NT4

    • Check that you have service pack 3 installed (There is a known problem with this in ServicePack2)

    • When a Winsock application calls one of the Winsock send APIs (Send, WSASend, and so on), one of the parameters passed to the API is the amount of data to be sent. If for any reason the Winsock driver, Afd.sys, could not send the total amount on a nonblocking socket in a single data packet, Afd.sys would incorrectly report the total bytes sent to the application. There may be other symptoms because an incorrect response will have an undetermined effect on the application.
      The following are possible workarounds.

    • In Win95 :
      the amount of retries may be increased editing the registry in :

      HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\VxD\MSTCP
      MaxConnectRetries =
      Data Type: DWORD
      Valid Range: 32-bit number
      This specifies the number of times a connection attempt (SYN) will be retransmitted before giving up. The initial retransmission timeout is 3 seconds, and it is doubled each time up to a maximum of 2 minutes.

    • On the NT Server :
      The amount of retransmissions may be increased in the registry:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
TcpMaxConnectRetransmissions=
data Type: REG_DWORD - Number
Valid Range: 0 - 0xFFFFFFFF
Default: 3
This parameter determines the number of times TCP will retransmit a connect request (SYN) before aborting the attempt. The retransmission timeout is doubled with each successive retransmission in a given connect attempt. The initial timeout value is three seconds.

TcpMaxDataRetransmissions
Key: Tcpip\Parameters
Value Type: REG_DWORD - Number
Valid Range: 0 - 0xFFFFFFFF
Default: 5
This parameter controls the number of times TCP will retransmit an individual data segment (non connect segment) before aborting the connection. The retransmission timeout is doubled with each successive retransmission on a connection. It is reset when responses resume. The base timeout value is dynamically determined by the measured round-trip time on the
connection.

  • IPX/SPX, Timeout errors

    • When running a Btrieve application on a Windows NT workstation using the Btrieve requester a Status Code 95, "The session is no longer valid," may be returned when using IPX/SPX to communicate with a Btrieve for NetWare Server Edition engine on a NetWare v3.12 server.

    • This is possible in a large or high traffic LAN segment. To resolve this problem, increase the SPX timeout parameters in the Windows NT registry under the following key:

      HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/ NwLink SPX/ Parameters
      connection timeout
      initial retransmission timeout
      keep alive timeout
      Double the value of all these parameters. This increases the amount of time the SPX session remains connected and reduces the likelihood of receiving an unexpected Status Code 95.

      If doubling these timeouts does not resolve or at least reduce the frequency of the problem, there is probably a communications problem on the network causing the SPX sessions to be terminated, rather than a timing problem.

    • You can also adjust the SPX timeouts on the NetWare Server. Run SPXCONFG.NLM at a NetWare server.
      These parameters are shown below with their default values:

      SPX VERIFY TIMEOUT=54
      SPX LISTEN TIMEOUT=108
      SPX ABORT TIMEOUT=540

      These three parameters (in the order listed above) have values in a 1:2:10 ratio. If the values are changed from the default settings, they should be kept in this ratio. It is a good idea to just double, or at most triple them all. If the status 95s persists, the problem is probably not related to a timing issue. SPX timing issues are common in large LAN segments, and are usually resolved by increasing these parameters.

  • Other causes of status 95s are related to communication problems on the network. This can be due to old workstation drivers for the network, old LAN card drivers at the workstation or server, bad hardware (usually the LAN cards at the workstations or server), or routing configuration problems in routers and/or bridges. It is often difficult to diagnose exactly what is causing the problem, but there are some actions that can be taken to help prevent it.

    • First, make sure your system is equipped with the latest workstation drivers , as well as the latest LAN card drivers from your LAN card manufacturer.

    • Next, try to isolate the problem. Is it happening on all workstations, or only some of them? Check with workstations on different segments on the LAN. You may want to try swapping hardware components at the server or at workstations to see if different LAN cards make a difference.

    • It is often a good idea to try other SPX applications. RCONSOLE is a good test for SPX

      1) Run RCONSOLE on a workstation,

      2) Let it run the length of time it takes for the Btrieve application to get the status 95, and

      3) See if RCONSOLE reports any errors.

In almost all cases, Btrieve status 95s are caused by a problem in the communications on your network.

Return to top

Status 97

Scala tried to read or write a record that is larger than what the btrieve requester allows.

  • On NT with IPX/SPX make sure that the internal IPX network number is set to a non-zero unique value

  • Set all client's IPX/SPX settings to manual frame type detection.

  • When running the DOS requester see to it that BREQNT or BREQUEST is run with the /D:4096 switch. This is set in the file btrieve.cfg, which can be found in the scala root directory.

  • If the solutions above do not solve the problem, contact Scala Support.

Return to top

Status 99

Scala cannot find a connection to the Runtime server.

  • This happens if support for Netware runtime server is enabled and scala cannot find a connection to the server, or a valid username. The usernames SUPERVISOR and ADMIN are not valid for Btrieve.
  • Check to see that you copied all the DLL's as described in the installing Btrieve document.

Return to top

//END