2017-02-17 8 views
0

16 진수 뷰어에서 dbf 파일 유형의 바이트를 확인하여 dbf 버전을 검색하는 방법은 무엇입니까?16 진 뷰어로 dbase 버전 확인

예시적인 스크린 샷이 아래 FoxBASE +/디베이스 III 플러스 http://www.digitalpreservation.gov/formats/fdd/fdd000325.shtml에서 문서에 근거없는 메모

에서 촬영했다.

은 0x03 = FoxBASE +/디베이스 III 플러스, 아니 메모

는 그 첫 번째 줄 첫 번째 문자 03 =의 0x03으로 이해할 수 있습니까? 다음은

Foxbase /DBaseIII Plus, no memo

03 75 02 11 92 00 00

내가 확인하고 싶은 알 수없는 디베이스 버전입니다. 04 75 02 10 DF으로 시작합니다.이 버전의 dBase를 어떻게 알 수 있습니까?

php dbase_open을 사용하여 연결을 시도했지만 작동하지 않습니다. (오류 메시지 : '경고 : dbase_open() : 데이터베이스 C를 열 수 없습니다 : ...')

Unknown Dbase version

답변

0

나는 내가 anwser를 발견 생각 http://www.dbase.com/KnowledgeBase/int/db7_file_fmt.htm

04 = 4의 dBASE 레벨에 대한 7.

헤더 구조는 dbase 웹 사이트에서 설명하는 것과 정확히 동일합니다.

Byte Contents  Description 
0  1 byte  Valid dBASE for Windows table file, bits 0-2 indicate version number: 3 for dBASE Level 5, 4 for dBASE Level 7. Bit 3 and bit 7 indicate presence of a dBASE IV or dBASE for Windows memo file; bits 4-6 indicate the presence of a dBASE IV SQL table; bit 7 indicates the presence of any .DBT memo file (either a dBASE III PLUS type or a dBASE IV or dBASE for Windows memo file). 
1-3  3 bytes  Date of last update; in YYMMDD format. Each byte contains the number as a binary. YY is added to a base of 1900 decimal to determine the actual year. Therefore, YY has possible values from 0x00-0xFF, which allows for a range from 1900-2155. 
4-7  32-bit  Number of records in the table. (Least significant byte first.) 
8-9  16-bit  Number of bytes in the header. (Least significant byte first.) 
10-11 16-bit  Number of bytes in the record. (Least significant byte first.) 
12-13 2 bytes  Reserved; filled with zeros. 
14  1 byte  Flag indicating incomplete dBASE IV transaction. 
15  1 byte  dBASE IV encryption flag. 
16-27 12 bytes  Reserved for multi-user processing. 
28  1 byte  Production MDX flag; 0x01 if a production .MDX file exists for this table; 0x00 if no .MDX file exists. 
29  1 byte  Language driver ID. 
30-31 2 bytes  Reserved; filled with zeros. 
32-63 32 bytes  Language driver name. 
64-67 4 bytes  Reserved. 
68-n 48 bytes each Field Descriptor Array (see 1.2). 
n+1  1 byte  0x0D stored as the Field Descriptor terminator. 
n+2     Field Properties Structure 

1.2 디스크립터 필드 배열

(One for each field in the table) 
Byte Contents Description 
0-31 32 bytes Field name in ASCII (zero-filled). 
32  1 byte  Field type in ASCII (B, C, D, N, L, M, @, I, +, F, 0 or G). 
33  1 byte  Field length in binary. 
34  1 byte  Field decimal count in binary. 
35-36 2 bytes  Reserved. 
37  1 byte  Production .MDX field flag; 0x01 if field has an index tag in the production .MDX file; 0x00 if the field is not indexed. 
38-39 2 bytes  Reserved. 
40-43 4 bytes  Next Autoincrement value, if the Field type is Autoincrement, 0x00 otherwise. 
44-47 4 bytes  Reserved. 

;04 = 4 for dBASE Level 7 
;75 02 10 = Date of last update; in YYMMDD 
;DF = 223 number of record 

; 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 

04 75 02 10 DF 00 00 00 15 03 B6 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
44 42 57 49 4E 55 53 30 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 

;Column name start from 68 offset (Need to convert from hex to ascii) 
;http://www.rapidtables.com/convert/number/hex-to-ascii.htm 
;Example, 53 49 54 45 4E 4D = SITENM 

;64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 
;   00 01 02 03 04 05 06 07 08 09 10 11 

00 00 00 00 53 49 54 45 4E 4D 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 

;(See 1.2 Field Descriptor Array) 
;0-31 = Field name in ASCII (zero-filled) 
;32 = Field type in ASCII 
;From below example the field type is 43 which is equal to 'C' in ascii 
;33 = Field length in binary. 
;From below example the field length is 0A which is equal to '10' in decimal 
;28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 

00 00 00 00 43 0A 00 00 00 00 00 00 00 00 00 00 

;Column will start from 00 and end in offset 47 (total 48 bytes until it readched '0D' Field Descriptor terminator) 
;So below 00 is start with another column 
;Example, 44 41 54 45 = DATE 

;44 45 46 47 00 01 02 03 04 05 06 07 08 09 10 11 

00 00 00 00 44 41 54 45 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 43 0A 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 54 49 4D 45 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 43 08 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 54 52 41 4E 53 5F 43 4F 44 45 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 43 02 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 54 52 41 4E 53 5F 44 45 53 43 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 43 1E 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 42 55 53 4E 4F 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 43 02 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 55 4E 49 54 4E 4F 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 43 02 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 52 45 41 44 45 52 4E 4F 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 43 02 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 43 4F 4E 54 4E 41 4D 45 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 43 0C 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 44 52 4E 41 4D 45 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 43 0C 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 43 41 52 44 4E 4F 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 43 06 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 4E 41 4D 45 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 43 23 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 44 45 50 54 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 43 0C 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 4A 4F 42 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 43 0C 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 49 46 49 45 4C 44 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 43 1A 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 0D -> Here is the Field Descriptor terminator '0D' 
```