dbTalk Databases Forums  

Data type in data file outputed from Btrieve V6

comp.databases.btrieve comp.databases.btrieve


Discuss Data type in data file outputed from Btrieve V6 in the comp.databases.btrieve forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
sunny076@yahoo.com
 
Posts: n/a

Default Data type in data file outputed from Btrieve V6 - 05-20-2005 , 07:41 PM






Hi,

We got a data file definition for Btrieve's database. This is a file
created in Btrieve V6 itself. Can anyone tell me how I can know the
datatype of the field and whether it is nullable?


Below is the example of the information in the file:

--#------ File Name ------Fields-Keys-Size- DB file ---- DBMS ---
Database ---
- 2-Branch_Master - 46- 4- 398- -Btrieve
v6-Btrieve -

------------------------------------------------------------------------------
File 2 : Branch_Master Length : 398

--#------ Field Name -----Typ--Attr----- Picture --------- Range
--------Size-
- 1-Bankid - 1- Type: -BankCode -001-999
- 2-
- 2-Branch_Code - 2- Type: -Branch Code -001-9999
- 2-
- 3-Regional_Offid - 0-Numeric-4 -
- 2-
- 4-Branch_Name - 6- Type: -Long Name -
- 45-
- 5-Short_Name - 7- Type: -Short Name -
- 20-

Thank you in advance,

Sunny


Reply With Quote
  #2  
Old   
Bill Bach
 
Posts: n/a

Default Re: Data type in data file outputed from Btrieve V6 - 05-21-2005 , 08:44 AM






You can get ALL of the information about Btrieve files from the BUTIL
-STAT <filename> command. It will display a neat chart of each index,
including its data type as well as the nullable and other attributes.

If the field that you are inquiring about is NOT indexed, though, then
there is no way to tell -- you'll have to guess!
Goldstar Software Inc.
Building on Btrieve(R) for the Future(SM)
Bill Bach
BillBach (AT) goldstarsoftware (DOT) com
http://www.goldstarsoftware.com
*** Chicago: Pervasive.SQL Service & Support - July 19-22 ***
*** Chicago: Pervasive DataExchange Class - July 27-29 ***

sunny076 (AT) yahoo (DOT) com wrote:

Quote:
Hi,

We got a data file definition for Btrieve's database. This is a file
created in Btrieve V6 itself. Can anyone tell me how I can know the
datatype of the field and whether it is nullable?


Below is the example of the information in the file:

--#------ File Name ------Fields-Keys-Size- DB file ---- DBMS ---
Database ---
- 2-Branch_Master - 46- 4- 398- -Btrieve
v6-Btrieve -

----------------------------------------------------------------------
-------- File 2 : Branch_Master Length : 398

--#------ Field Name -----Typ--Attr----- Picture --------- Range
--------Size-
- 1-Bankid - 1- Type: -BankCode -001-999
- 2-
- 2-Branch_Code - 2- Type: -Branch Code -001-9999
- 2-
- 3-Regional_Offid - 0-Numeric-4 -
- 2-
- 4-Branch_Name - 6- Type: -Long Name -
- 45-
- 5-Short_Name - 7- Type: -Short Name -
- 20-

Thank you in advance,

Sunny

Reply With Quote
  #3  
Old   
sunny076@yahoo.com
 
Posts: n/a

Default Re: Data type in data file outputed from Btrieve V6 - 05-23-2005 , 11:41 AM



Thank you for your help. I ran the butil.exe, but it returned the stat
only for the unique keys. Also, the record length showed (from
butil.exe) is different from the word file sent from the client. Is
there any other way I can get data types of all the fields in the data
file?

Thank you in advance,

Sunny


Reply With Quote
  #4  
Old   
sunny076@yahoo.com
 
Posts: n/a

Default Re: Data type in data file outputed from Btrieve V6 - 05-23-2005 , 11:41 AM



Thank you for your help. I ran the butil.exe, but it returned the stat
only for the unique keys. Also, the record length showed (from
butil.exe) is different from the word file sent from the client. Is
there any other way I can get data types of all the fields in the data
file?

Thank you in advance,

Sunny


Reply With Quote
  #5  
Old   
nelsonsoft
 
Posts: n/a

Default Re: Data type in data file outputed from Btrieve V6 - 05-23-2005 , 12:42 PM



The data from butil will be current for the file. Your word doc may be
out of date. Do they have the DDF files (file.ddf,field.ddf,
index.ddf). These describe the file layout. Otherwise you will can
use BtSearch32 at www.nssdd.com to help you analyze the structure and
build the DDF files.

Gil


Reply With Quote
  #6  
Old   
Bill Bach
 
Posts: n/a

Default Re: Data type in data file outputed from Btrieve V6 - 05-24-2005 , 06:59 AM



The only other way is this: Export the data (using BUTIL -SAVE) to a
flat, or "unformatted" file. The resulting unformatted file will have
this format:
<Length>,<Length number of bytes of record data><CR><LF>

You will need to evaluate each record and how the data appears in this
"blob" to see if the docs are correct. Obviously, an understanding of
the source code or documentation, an understanding of the language
uised to write the application, and an understanding of computer-based
data structures and data types is a must here.

It's just like sifting through a gold mine -- with a good map, you
might get lucky and have everything fall into place for easy access.
Or you may end up digging for a few days and still miss it...
Goldstar Software Inc.
Building on Btrieve(R) for the Future(SM)
Bill Bach
BillBach (AT) goldstarsoftware (DOT) com
http://www.goldstarsoftware.com
*** Chicago: Pervasive.SQL Service & Support - July 19-22 ***
*** Chicago: Pervasive DataExchange Class - July 27-29 ***

sunny076 (AT) yahoo (DOT) com wrote:

Quote:
Thank you for your help. I ran the butil.exe, but it returned the stat
only for the unique keys. Also, the record length showed (from
butil.exe) is different from the word file sent from the client. Is
there any other way I can get data types of all the fields in the data
file?

Thank you in advance,

Sunny

Reply With Quote
  #7  
Old   
Leonard
 
Posts: n/a

Default Re: Data type in data file outputed from Btrieve V6 - 05-26-2005 , 02:17 AM



The application vendor is the best source to get the SQL schema for
the files that comprise the database for their application.
Gil is correct, the butil -stat reports what is currently in the file.
If the word doc is out of date I would worry that if they had DDFs
that they might not be correct also.

Leonard

On 23 May 2005 10:42:13 -0700, "nelsonsoft" <nelsonsoft (AT) hotmail (DOT) com>
wrote:

Quote:
The data from butil will be current for the file. Your word doc may be
out of date. Do they have the DDF files (file.ddf,field.ddf,
index.ddf). These describe the file layout. Otherwise you will can
use BtSearch32 at www.nssdd.com to help you analyze the structure and
build the DDF files.

Gil


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.