Solved

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

Posted on 2008-10-23
6
1,501 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
  • 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
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
Never store passwords in plain text or just their hash: it seems a no-brainier, but there are still plenty of people doing that. I present the why and how on this subject, offering my own real life solution that you can implement right away, bringin…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

708 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

11 Experts available now in Live!

Get 1:1 Help Now