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

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?
LVL 1
GeekHipsterAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Bill BachPresident and Btrieve GuruCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
GeekHipsterAuthor Commented:
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
Bill BachPresident and Btrieve GuruCommented:
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
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

GeekHipsterAuthor Commented:
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
GeekHipsterAuthor Commented:
Still waiting for the client to get back to me, I guess they're not too concerned about it.
0
GeekHipsterAuthor Commented:
I have finally received the PVSW.LOG file from their main server and there is nothing in it for the date in question.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Databases

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.