Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.


Issues creating DDF files for a btrieve 6.15 dat

Issues creating DDF files for a btrieve 6.15 dat

I'm having an issue when trying to build ddf files for one of about 9 dat files. All the others came over with no problem, but for some reason this ones not working correctly. The file itself is about 5MB big. It is for an old WG game called MajorMUD. It actually contains things called textblocks. At one point in time someone created a viewer, so I can see what the file is "supposed" to contain, but as soon as i use the pervasive builder on it, it only displays 2 fields with the following properties:

Offset  Size  Btrieve Type
0       18    Unsigned Binary
18      6     Unknown

Im fairly new at the whole btrieve thing to be honest with you. Im doing this so that I can create dynamic php pages from the dats using odbc/sql that pervasive 9.5 supplies.

If there is anyone that might be able to help me, I could send the dat files to you so that you could look at them. I would also be able to send you either a screenshot, or a copy of the viewer i use with the dats.

Thanks in advance, you guys are my last hope.

RE: Issues creating DDF files for a btrieve 6.15 dat

You have to define the fields exactly down to the byte level.  For example, if your record is 100 bytes long, you have to account for each and every byte.  What I would suggest is try to find the exact record structure so you can then use the DDF Builder or the Create Table Wizard or a CREATE TABLE SQL statement or a third party tool.  
The Create Table Wizard only displays the indexes I believe.  
Post a BUTIL -STAT of the data file.  
If you've got the exact record structure including data types, post that too.  

Certified Pervasive Developer
Certified Pervasive Technician

RE: Issues creating DDF files for a btrieve 6.15 dat

The problem is all I have on these dat files are the dat files. I have no info on them what so ever and I am very new with btrieve. Here is the butil stat

This is all I get from the file stats

File Version                    ?.?
Page Size                       2048
Page Preallocation              No
Key Only                        No
Extended                        No
Total Number of Records         2549
Data Compression                No
Variable Records                No
Available Linked Duplicate Keys 0
Balanced Key                    No
Total Number of Keys            1
Total Number of Segments        1

RE: Issues creating DDF files for a btrieve 6.15 dat

here you go

File Version = 6.00
Page Size = 2048
Page Preallocation = No
Key Only = No
Extended = No

Total Number of Records = 2549
Record Length = 24
Record Compression = No
Page Compression = No
Variable Records = Yes
   Variable-Tail Allocation Tables = No
   Blank Truncation = No
Free Space Threshold = 5%

Available Linked Duplicate Keys = 0
Balanced Key = No
Log Key = 0
System Data = No
Total Number of Keys = 1
Total Number of Segments = 1

Key         Position        Type            Null Values*               ACS
    Segment          Length           Flags              Unique Values
  0    1         1      18  Unsigned            --              2549    --

 < = Descending Order
 D = Duplicates Allowed
 I = Case Insensitive
 M = Modifiable
 R = Repeat Duplicate
 A = Any Segment (Manual)
 L = All Segments (Null)
 * = The values in this column are hexadecimal.
?? = Unknown
-- = Not Specified

The command completed successfully.

RE: Issues creating DDF files for a btrieve 6.15 dat

From the looks of it, there are only two fields.  One is an 18 byte unsigned and the other is 6 bytes.  Those 6 bytes are something you're going to have to determine. They could be one field or multiple fields.  For example, the data could be a 4 byte integer and a 2 byte integer, or it could be a 6 byte string.  What does your viewer show?  
We can't post email addresses on the site but you can post the data file on a web site if you want us to look at it.  

Certified Pervasive Developer
Certified Pervasive Technician

RE: Issues creating DDF files for a btrieve 6.15 dat


Here is a link to 2 screenshots and the dat file itself.

The screenshots show a view of the data itself. As you can see there are 3 integer fields and a forth one with text. The forth one doesnt come up at all. The only other files in the viewer are w32mkde.exe and wbtrv32.dll version 6.15.

If you need a copy of the viewer I can supply that too.

Thanks for your help!

RE: Issues creating DDF files for a btrieve 6.15 dat

The 24-byte data record probably contains the block number, part number, and links information, but how that's exactly stored I can't really say.  They could be two 8-byte unsigned integers followed by a 2-byte unsigned integer, all combined to make up the 18-byte key.  I don't see anything readable or a pattern in the other 6 bytes of the record.

The text is all stored in the variable portion of the record, which is 2000 bytes long in every record.  However, it must be encoded text because it also is not readable.

Try doing a BUTIL -RECOVER to dump the data out to a flat file, then open up the flat file in Notepad.  This shows you the raw data in the format:
    <record length>,<record image>
For this file, the record length is 2024 for every record, so you'll see 2024 then a comma then 2024 bytes of data.

The application that uses this file obviously knows how to interpret the 2000 bytes of variable length data into a text display.  Since the viewer you show in your jpg's has all kinds of buttons for changing color and other stuff, I'm guessing all that is encoded in the 2000 bytes as well.

There's not much more I can tell you about the data.

Pervasive Software

RE: Issues creating DDF files for a btrieve 6.15 dat

If you need to build the DDF files you can take a look at BtSearch at  It helps you analyze the data structure and then build the DDF files.


RE: Issues creating DDF files for a btrieve 6.15 dat

Thanks guys I got it to work! When I was using pervasive's builder and i tried to set the record offset to 24 with a length of 2000 the whole bar turned red, so I originally figured this was bad and it would error out. Well turns out I did it and it worked, then it was just a matter of decoding the text.

Thanks you guys rock!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close