• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 5451
  • Last Modified:

How do I view the contents of BTR files without the Pervasive/Btrieve Engine

I have a BTR file which I need to export the contents or at least provide read access (either programatically or manually), but I do not have any Pervasive SQL or Btrieve Engine installed. How can I view the contents of the files?
0
lepricon
Asked:
lepricon
  • 13
  • 8
  • 4
3 Solutions
 
mirtheilCommented:
You can't.  You have to have a PSQL/Btrieve engine available to read the data files.  
A trial version is available at http://www.pervasivedb.com/Database/Products/PSQLv10/Pages/PSQLOverview.aspx.  Once you have an engine installed, you can read the file in a number of ways.  If you have DDFs, you can just create an ODBC DSN and read the data using any number of tools.  If you don't have DDFs, you'll need to know the record structure of the file.  WIth the record structure, you can either create DDFs or read the file through Btrieve.  
0
 
lepriconAuthor Commented:
I have downloaded a trial from there., but I get an error while trying to open the files.

How do I create an ODBC DSN?
0
 
mirtheilCommented:
What error?

Do you have DDFs (FILE.DDF, FIELD.DDF, and INDEX.DDF) in the same directory as the BTR file you want to read?

A better description than I could write on creating DSNs / Database Names:
http://docs.pervasive.com/products/database/psqlv10/wwhelp/wwhimpl/js/html/wwhelp.htm#href=uguide/using.3.5.html
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
lepriconAuthor Commented:
The error is "error 30 on btrv open"

Yes I do, I have the listed DDF files but I have tons of BTR files. i am not sure which iof the BTR files uses the DDF files

Reading the link you posted above, it seems I need to have the server engine installed?

Pardon my naivety. This is my first time working with BTR files.
0
 
mirtheilCommented:
Actually the steps are the same for both the workgroup and server engine.  

The status 30 indicates that the file is not a Btrieve file. Either it is very corrupt or really isn't a Btrieve file.  What tool are you using when you get that error?  

Btrieve files don't require DDFs but some access methods do (like ODBC, OLEDB, ActiveX, etc).  The DDF files describe the BTR files to other interfaces (like ODBC, OLEDB, etc).  If you used pure Btrieve, DDFs are not needed.  
0
 
lepriconAuthor Commented:
I am using the Pervasive Data Parser. I am attaching a screenshot
btr.png
0
 
mirtheilCommented:
Can you open the BTR file using the Pervasive Function Executor?  It's at \program files\pervasive software\psql\bin\wbexec32.exe by default.  Does it give the status 30 as well?  
What shows up if you open the BTR file in Notepad?  It probably won't be readable but might give some insight.
0
 
mirtheilCommented:
Also, check the Task Manager.  Check for W32MKDE.EXE and W3DBSMGR.EXE.  Which one is running?  
The status 30 could also indicate an older engine is trying to open a newer format file.  
0
 
lepriconAuthor Commented:
I have w3dbsmgr.exe running. Is it possible the BTR file is password protected?
0
 
mirtheilCommented:
If it had a password, it would return a status 51.  Did Function Executor return the status 30 also? What does Notepad show?
0
 
lepriconAuthor Commented:
I opened the BTR file in notepad, screenshot attached
btr-screen.png
0
 
lepriconAuthor Commented:
Function Executor also could not open. Screenshot attached
bexec-screen.png
0
 
mirtheilCommented:
Function Executor is returning a 3012 which is different than a status 30.  

What exactly did you install in terms of Pervasive PSQL?  Was it the Workgroup Engine?  If so, did you install as a tray app or as a service?  

0
 
lepriconAuthor Commented:
I downloaded the client (PSQL-Client-10.30.022.000-win.x86) and Data Tools (PVDataTools-9.2.1.42.1-setup). I am currently downloading the server engine (PSQL Server).
0
 
Bill BachPresidentCommented:
Your screenshot certainly LOOKS like a Btrieve file.  However, without getting an image from a real hex editor, I cannot tell you WHICH version it might be.  (It appears to be 6.x or newer.)

Status 30 indicates that the file cannot be interpreted by the engine that you have, which could indicate that the file is a newer version than then engine that is running.  It is possible that there is an older Btrieve 6.x engine hanging around that is trying to read the files.  Search out and rename any files named W32MKDE.EXE on the system, just in case.  If you did properly install the PSQLv10 engine, then it can properly read *all* known Btrieve file types, so that should not be it.  However, your 3012 indicates that there is no engine installed, so perhaps the install just didn't work right for some reason.  Of course, a Status 30 could ALSO indicate that the file is damaged and corrupted beyond easy repair.

Getting back to your original question:  If the Btrieve file is really an older 6.x file, then you can go to www.jimkyle.com, click on Kyle's Files, and download a copy of DSave3a.exe from there.  This will read 5.x, 6.x, and some 7.x files (at least those smaller files with less than 32 PAT pairs).  You do NOT need to have Pervasive loaded for this tool to work.  Of course, if the files are larger 7.x files, or any newer version (8.x, 9.0, 9.5), then we're back to the original problem of getting PSQLv10 to work.
0
 
mirtheilCommented:
The Client doesn't include an engine and can't access files. Once the Server engine downloads and is installed try the Function Executor again.  If it can open the file, then try the Data Parser.  It should work at that point.  

I think the status 30 in Data Parser is a red herring and the error may be truncated.  
0
 
lepriconAuthor Commented:
I will try that and get back to you. Have to leave the office and head home. Will reconnect as soon as I get home.

Thank you for your time so far.

PS: For some reason, the jimkyle.com site is unavailable to me. Will try it when I get home
0
 
lepriconAuthor Commented:
Downloaded the server installation and ran the function executor again. Screenshot attached
function-executor.png
0
 
Bill BachPresidentCommented:
OK -- so you're in the file now.  Click on the StepFirst Button (it looks like this: |< ) and it should load the first record for you.  

To export this data to a UNF file, start the Pervasive Maintenance Utility, then select Data/Save and enter the file name and a UNF file name.  A UNF file will consist of a number representing the record length, a comma, and then that number of bytes, followed by a CR/LF pair.  You can then parse this file to get the raw records.

If you have data dictionary files, as Mirtheil suggests, then you should also be able to access the data from ODBC.  First, start the Pervasive Control Center.  Right click on Databases and select New/Database.  Supply the path to your data files (and DDF's) and it should load the definitions for you.  You can then click right on the tables to view data, or right-click and select Export Data... to use the Wizard.


0
 
lepriconAuthor Commented:
Like I said earlier, I have some DDF files but I am not sure which of the BTR files they define. I am currently running the maintenance utility. Will reply as soon as it completes.
0
 
Bill BachPresidentCommented:
In many cases, the DDF files contain definitions for ALL files in the database.  However, sometimes they are empty ones that were created by mistake, too.
0
 
lepriconAuthor Commented:
I loaded the PCC as advised but came up with an "empty" database containing just one table which had no records
0
 
Bill BachPresidentCommented:
Look for another set of DDF's.  If you don't have any, then you'll either need to create the table definitions on your own, and just interpret the raw UNF file.

Here's a link which might help:
http://www.goldstarsoftware.com/papers/Accessing%20Btrieve%20Data%20From%20ODBC%20or%20Other%20Applications.pdf
0
 
lepriconAuthor Commented:
I had to split the points as such because mirtheil's solutions helped me to start while BillBach's comment pointed me to a solution that simplified the process. I also used an application from ClassicSoftware.com that seemed like a GUI version of Dsave from BillBach's comment. I had already been able to view raw data from Mirtheil's comments.

Thank you.
0
 
lepriconAuthor Commented:
I was able to view raw data using Mirtheil's solutions while I was able to export the raw data using the DSave application suggested by BillBach, though it did not work on large files. Could not export a 2gb file.

I also used an application from classSoftware.com (Data Manager) that seemed like a GUI of DSave
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 13
  • 8
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now