Btrieve status 46 - DOS app running on PVSW workgroup

Hi gurus,

I need to state from the begining that I know NOTHING about dabase development so I need loads of clear assistance.

Here is my scenario;
NW 5 server running pervasive s/w (Btrieve?). DOS & Win95 clients & an old DOS database. NW box is playing up and H/W is no longer supported and my knowledge in NW is fading fast.

Have copied database data to shared folder on W2K server, XP SP2 clients running pervasive v9 workgroup (eval). After some playing around I can get the DOS application work in terms of reading data and printing. The problem comes when attempting to either modify or add data. We get a BTrieve status 46 on the main database file.

I have checked the file attributes and folder security and it appears fine....but as I said, I don't know enough to be sure.

Any suggestions/recommendations welcome. I have not purchased the workgroup edition yet so if I need a different version, let me know.

Many thanks in advance.
Chris RipollMaster of NoneAsked:
Who is Participating?
mirtheilConnect With a Mentor Commented:
Are the Btrieve data files in V5.x format?  If so, that will cause the PSQL V9 engine to return a status 46.  The solution is to rebuild the data files to at least v6.x format.
Bill BachConnect With a Mentor PresidentCommented:
Since you claim to have no database experience, here's a bit more detail:

To rebuild the database files, go to the server and select Start/Programs/Pervasive/Other Utilities/Rebuild.  This will start the Pervasive Rebuild utility.  

You will need to verify that all users are OUT of the application, and that all of the files are closed.  You can verify this for sure by running the Pervasive Monitor tool and looking at the Microkernel/Active Files screen.

Back in the Rebuild tool, use the GUI to select your list of files to rebuild.  You will want to rebuild ALL database files.  Determining which files are database files is not always easy, though most app developers use a consistent extension (like BTR, DAT, MKD, etc.).  You can shift-click and Ctrl-click files in the dialog box to select multiple files.

Once you have selected the files to rebuild, click Next to go to the parameter screen.  Here, you can change things like page size, file version, and more.  The defaults will probably be OK.  However, you'll want to check "Continue On Error", just in case you pick a file that's not a Btrieve file.

Click Next/OK to start the rebuild process.  This will take some time (depending on the file sizes) and all users must stay out during this process.  When it is done, you should be able to run correctly without getting the Status 46.  (However, if the server has ReadOnly rights to the database directory or if files are flagged ReadOnly, it may also cause Status 46's to appear.)
Chris RipollMaster of NoneAuthor Commented:
Thanks thus far. I'll add a little more background;

The DOS application in question is about approximately 10-15 years old. The system originaly ran off a netware 3.11 (Trusty workhorse) server on a 10 year old Proliant. For support reasons, we built a netware 5 server and loaded pervasive v7 (from memory). When we did the cut over from the old server to the new, i just copied the data from old to new and it just ran !! I did not need to do anything at all so I have absolutely no idea what version the database files are but I will follow the intructions as per above.

The new system is running in parallel at the moment so if i "stuff it up", its no problem.

On the pervasive software; Is there anything I need to do or setup on the GUI side for this to work? According to the notes on DOS apps, it loads the appropriate engine and just runs.

Improve Your Query Performance Tuning

In this FREE six-day email course, you'll learn from Janis Griffin, Database Performance Evangelist. She'll teach 12 steps that you can use to optimize your queries as much as possible and see measurable results in your work. Get started today!

PSQL v9 will not write to 5.x files.  There's nothing that can be set to change that.  PSQL 7 and PSQL 8 both write to 5.x files but PSQL 9 will not.  

You can check the version of the data files by issuing a BUTIL -STAT <path>\<filename> from the command prompt for each (or a representative sample).  The file version is displayed as one of the statistics.  
Bill BachPresidentCommented:
If you have installed the PSQLv9 client to each machine, then you should be OK.  Windows NT, 2000, XP, and 2003 boxes will load the DOS drivers automatically, so you won't need either BREQUEST or BTRIEVE in the batch file that starts the app any more.  

If you have Win95 or Win98 machines, however, you WILL need something else -- there is a component that needs to be loaded on each workstation (loading at startup is fine) called BTRBOX95.EXE.  This is the BTRBOX95 icon on the Pervasive application group.  Then, load BDOSSTUB.EXE in the DOS window prior to running the app.
Chris RipollMaster of NoneAuthor Commented:
I have checked the version and it reports "Prior to v6" so we are talkig old here.

I then followed the instructions to do the rebuild but I got the following error;

Rebuild-82: Login to database failed. Microkernel status 3103 was returned.

Bill BachPresidentCommented:
A 3103 is a communications failure.  Check the firewall settings on both the client and server, and see if they are active.  If so, disable them (temporarily) to see if this resolves it.  If so, turn on logging and open up the needed ports, usually 3351, but there can be others as well.

Chris RipollMaster of NoneAuthor Commented:
Hi all,

Many thanks for the assistance. I tried sorting out the 3103 problem as per above but I found that the only way to get it to work was by copying the data files to a local drive, then converting them. All is working now. Now all I need to learn is how to extract some records out of this old database to email data to clients.... but that is another story...

I would like to split the points between both mirtheil and billbach is that is OK with both parties, as both offered great assistance to a novice in need...

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.

All Courses

From novice to tech pro — start learning today.