Solved

What could cause a Btrieve error 3 when it gets returned from a PsqlCommand object?

Posted on 2008-10-23
6
1,558 Views
Last Modified: 2013-12-20
Our application uses Pervasive.Data.SqlClient.dll version 2.10.1.2 to communicate with a btrieve database in Visual Basic, .NET 2.0, Studio 2005.  Whenever an exception is thrown from the PsqlCommand object, we log the error.

In this case the error happens intermittently, 3 - 4 times a month on a 25+ user real-time accounting / order processing application... of course this is enough to cause trouble.  Anyone?
0
Comment
Question by:GeekHipster
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 
LVL 28

Accepted Solution

by:
Bill Bach earned 500 total points
ID: 22791223
Status 3 is a secondary error -- "file is not open".  It is almost always preceeded by a primary error, either in opening the file (e.g. 12, 35, etc.) , or after a network disconnect (e.g. 3111, 3112, etc.).

With that intermittent failure rate, I'd suspect the latter.  Check the PVSW.LOG on the server and on the affected WS to see if any networking errors are reported.  If you are experiencing *temporary* network outages, then you can enable Pervasive Auto ReConnect (PARC) and the system will try to survive the outages somehow.  Longer outages (over 3 minutes by default) will still result in an error.  A better solution is to figure out WHY the network connections are breaking and to fix the cause.  When you fix it, disable PARC to avoid the extra overhead.
0
 
LVL 1

Author Comment

by:GeekHipster
ID: 22799279
Here's a portion of the PVSW.LOG file for the date that the error occurred on one of the machines having this problem.  There was nothing close to the date range I'm concerned with on the server's file.

My application logged the error on this machine as happening at 11:15am.... I don't see that in here.

10-06-2008 08:10:30 MKDE            00000CAC w3dbsmgr.exe    COMP1         I                        Error initializing the SPX protocol. Error code: 6.
10-06-2008 08:10:31 W3COMSRV        00000CAC w3dbsmgr.exe    COMP1         I                        WinSock socket() error=10022 on one of potentially several NETBIOS protocol stacks.
10-06-2008 08:10:31 W3COMSRV        00000CAC w3dbsmgr.exe    COMP1         I                        WinSock socket() error=10022 on one of potentially several NETBIOS protocol stacks.
10-06-2008 08:10:31 W3COMSRV        00000CAC w3dbsmgr.exe    COMP1         I                        WinSock socket() error=10022 on one of potentially several NETBIOS protocol stacks.
10-06-2008 08:10:31 W3COMSRV        00000CAC w3dbsmgr.exe    COMP1         I                        WinSock socket() error=10022 on one of potentially several NETBIOS protocol stacks.
10-06-2008 08:10:31 W3COMSRV        00000CAC w3dbsmgr.exe    COMP1         E                        WinSock bind() error=10050.
10-06-2008 08:10:31 MKDE            00000CAC w3dbsmgr.exe    COMP1         I                        Error initializing the NetBIOS protocol. Error code: 10050.
10-06-2008 08:10:31 W3COMSRV        00000CAC w3dbsmgr.exe    COMP1         E                        WinSock bind() error=10050.
10-06-2008 08:10:31 MKDE            00000CAC w3dbsmgr.exe    COMP1         I                        Error initializing the NetBIOS protocol. Error code: 10050.
10-06-2008 08:10:31 W3COMSRV        00000CAC w3dbsmgr.exe    COMP1         E                        WinSock bind() error=10050.
10-06-2008 08:10:31 MKDE            00000CAC w3dbsmgr.exe    COMP1         I                        Error initializing the NetBIOS protocol. Error code: 10050.
10-06-2008 08:10:31 W3COMSRV        00000CAC w3dbsmgr.exe    COMP1         E                        WinSock bind() error=10050.
10-06-2008 08:10:31 MKDE            00000CAC w3dbsmgr.exe    COMP1         I                        Error initializing the NetBIOS protocol. Error code: 10050.
10-06-2008 08:10:31 W3COMSRV        00000CAC w3dbsmgr.exe    COMP1         E                        WinSock bind() error=10050.
10-06-2008 08:10:31 MKDE            00000CAC w3dbsmgr.exe    COMP1         I                        Error initializing the NetBIOS protocol. Error code: 10050.
10-06-2008 08:10:31 W3COMSRV        00000CAC w3dbsmgr.exe    COMP1         E                        WinSock bind() error=10050.
10-06-2008 08:10:31 MKDE            00000CAC w3dbsmgr.exe    COMP1         I                        Error initializing the NetBIOS protocol. Error code: 10050.
10-06-2008 08:10:31 W3COMSRV        00000CAC w3dbsmgr.exe    COMP1         E                        WinSock bind() error=10050.
10-06-2008 08:10:31 MKDE            00000CAC w3dbsmgr.exe    COMP1         I                        Error initializing the NetBIOS protocol. Error code: 10050.
10-06-2008 08:10:31 W3COMSRV        00000CAC w3dbsmgr.exe    COMP1         I                        WinSock socket() error=10022 on one of potentially several NETBIOS protocol stacks.
10-06-2008 08:10:31 W3COMSRV        00000CAC w3dbsmgr.exe    COMP1         E                        WinSock bind() error=10050.
10-06-2008 08:10:31 MKDE            00000CAC w3dbsmgr.exe    COMP1         I                        Error initializing the NetBIOS protocol. Error code: 10050.
10-06-2008 10:02:38 MKDE            00000CAC w3dbsmgr.exe    COMP1         E                        The file LAST_SEG.LOG cannot be opened in the log segment directory C:\PVSW\bin\MKDE\LOG.
10-06-2008 10:02:38 MKDE            00000CAC w3dbsmgr.exe    COMP1         W                        Resources allocated
10-06-2008 16:35:40 MKDE            00000CAC w3dbsmgr.exe    COMP1         E                        The file LAST_SEG.LOG cannot be opened in the log segment directory C:\PVSW\bin\MKDE\LOG.
10-06-2008 17:10:45 MKDE            00000CAC w3dbsmgr.exe    COMP1         E                        The file LAST_SEG.LOG cannot be opened in the log segment directory C:\PVSW\bin\MKDE\LOG.

Open in new window

0
 
LVL 28

Expert Comment

by:Bill Bach
ID: 22799940
The errors about NetBIOS can be ignored.  Although it WOULD be better for this user to configure the workstation to disable the NetBIOS protocol in the Pervasive engine (it is enabled by default) to avoid the errors and keep the log smaller.  While in there, disable SPX, too, as it is also not currently installed on the workstation.

As for the Status 3, this is a tough one, then.  It may be that something is overwriting memory and mangling the position block in the Btrieve interface, or perhaps some other "file-close" operation gets sent but the app still thinks it is open, thus triggering the Status 3.  Debugging this one will take a LOT of detailed effort.

I would start by getting the latest SDK from Pervasive's web site & see if that helps.  Alternatively, patch the engine.  Since you reported the version as v9.6, and since this is ONLY available as an OEM version (like through Sage -- v9.52.xxx is the only publicly-available version), then you'll need to speak with your OEM developer directly to see if any patches are available for the v9.6 engine.
0
Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

 
LVL 1

Author Comment

by:GeekHipster
ID: 22799991
I just found out I got the wrong log file from their server.  They sent me the log file from a server they no longer use.

ugh.

I will be in touch again in a few days, hopfully with a helpful error log.  I appreciate the help, I will get back to you.
0
 
LVL 1

Author Comment

by:GeekHipster
ID: 22863810
Still waiting for the client to get back to me, I guess they're not too concerned about it.
0
 
LVL 1

Author Comment

by:GeekHipster
ID: 22906972
I have finally received the PVSW.LOG file from their main server and there is nothing in it for the date in question.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Shadow IT is coming out of the shadows as more businesses are choosing cloud-based applications. It is now a multi-cloud world for most organizations. Simultaneously, most businesses have yet to consolidate with one cloud provider or define an offic…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

732 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