powered by simpleCommunicator - 2.0.53     © 2025 Programmizd 02
Форумы / Microsoft SQL Server [игнор отключен] [закрыт для гостей] / Открыть DBF
5 сообщений из 30, страница 2 из 2
Открыть DBF
    #39934600
Фотография alexeyvg
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Sergey Sizov,

А откуда это описание?
Может, это как раз описание того движка, который используется в драйвере Microsoft.ACE.OLEDB.12.0...
Я такого не находил, не дадите ссылку?
...
Рейтинг: 0 / 0
Открыть DBF
    #39934607
Sergey Sizov
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
alexeyvg
Sergey Sizov,

А откуда это описание?
Может, это как раз описание того движка, который используется в драйвере Microsoft.ACE.OLEDB.12.0...
Я такого не находил, не дадите ссылку?
Это из официальной доки по Visual Foxpro. Раньше ее можно было скачать, сейчас уже все ссылки битые.
Вот вам еще выдержка их этой доки:
Visual FoxPro 9.0 SP2
Table File Structure (.dbc, .dbf, .frx, .lbx, .mnx, .pjx, .scx, .vcx)
See Also
CollapseAll image Collapse All Expand All

Visual FoxPro uses tables to store data that defines different file types. The following list includes the file types that are saved as tables:

Database (.dbc)

Form (.scx)

Label (.lbx)

Menu (.mnx)

Project (.pjx)

Report (.frx)

Table (.dbf)

Visual class library (.vcx)

You can use and browse these files in the same way that you browse any table file because these files are actually tables.

A table file consists of a header record and data records. The header record defines the structure of the table and contains any other information related to the table. The header record starts at file position zero. Data records follow the header, in consecutive bytes, and contain the actual text of the fields.

NoteNote
The data in the data file starts at the position indicated in bytes 8 to 9 of the header record. Data records begin with a delete flag byte. If this byte is an ASCII space (0x20), the record is not deleted. If the first byte is an asterisk (0x2A), the record is deleted. The data from the fields named in the field subrecords follows the delete flag.


The length of a record, in bytes, is determined by summing the defined lengths of all fields. Integers in table files are stored with the least significant byte first.

For information about the table structures of the different file types, see Table Structures of Table Files.

Collapse imageTable Header Record Structure
Byte offset Description
0
File type:

0x02 FoxBASE / dBase II

0x03 FoxBASE+ / FoxPro /dBase III PLUS / dBase IV, no memo

0x30 Visual FoxPro

0x31 Visual FoxPro, autoincrement enabled

0x32 Visual FoxPro, Varchar, Varbinary, or Blob-enabled

0x43 dBASE IV SQL table files, no memo

0x63 dBASE IV SQL system files, no memo

0x83 FoxBASE+/dBASE III PLUS, with memo

0x8B dBASE IV with memo

0xCB dBASE IV SQL table files, with memo

0xF5 FoxPro 2.x (or earlier) with memo

0xFB FoxBASE (?)

1 - 3
Last update (YYMMDD)

4 – 7
Number of records in file

8 – 9
Position of first data record

10 – 11
Length of one data record, including delete flag

12 – 27
Reserved

28
Table flags: 0x01 file has a structural .cdx 0x02 file has a Memo field 0x04 file is a database (.dbc) This byte can contain the sum of any of the above values. For example, the value 0x03 indicates the table has a structural .cdx and a Memo field.

29
Code page mark

30 – 31
Reserved, contains 0x00

32 – n
Field subrecords The number of fields determines the number of field subrecords. One field subrecord exists for each field in the table.

n+1
Header record terminator (0x0D)

n+2 to n+264
A 263-byte range that contains the backlink, which is the relative path of an associated database (.dbc) file, information. If the first byte is 0x00, the file is not associated with a database. Therefore, database files always contain 0x00.


Collapse imageField Subrecords Structure
Byte offset Description
0 – 10
Field name with a maximum of 10 characters. If less than 10, it is padded with null characters (0x00).

11
Field type:

W - Blob

C – Character

C – Character (binary)

Y – Currency

B – Double

D – Date

T – DateTime

F – Float

G – General

I – Integer

L – Logical

M – Memo

M – Memo (binary)

N – Numeric

P – Picture

Q - Varbinary

V - Varchar

V - Varchar (binary)

NoteNote
For each Varchar and Varbinary field, one bit, or "varlength" bit, is allocated in the last system field, which is a hidden field and stores the null status for all fields that can be null. If the Varchar or Varbinary field can be null, the null bit follows the "varlength" bit. If the "varlength" bit is set to 1, the length of the actual field value length is stored in the last byte of the field. Otherwise, if the bit is set to 0, length of the value is equal to the field size.


12 – 15
Displacement of field in record

16
Length of field (in bytes)

17
Number of decimal places

18
Field flags: 0x01 System Column (not visible to user) 0x02 Column can store null values 0x04 Binary column (for CHAR and MEMO only) 0x06 (0x02+0x04) When a field is NULL and binary (Integer, Currency, and Character/Memo fields) 0x0C Column is autoincrementing

19 - 22
Value of autoincrement Next value

23
Value of autoincrement Step value

24 – 31
Reserved


For information about limitations on characters per record, maximum fields, and so on, see Visual FoxPro System Capacities.
...
Рейтинг: 0 / 0
Открыть DBF
    #39934614
Фотография alexeyvg
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Sergey Sizov
Это из официальной доки по Visual Foxpro. Раньше ее можно было скачать, сейчас уже все ссылки битые.
Да, нашёл в нескольких описаниях по Foxpro
Но странно, что в этом описании для имени указано 11 байт, а записать можно только 10 из них...

Возможно, это ограничение именно Foxpro, и, возможно, это же ограничение используется в Microsoft.ACE.OLEDB драйвере

У ТС в файле же заняты все 11 байт, он же не в HEX-редакторе файл правил.
...
Рейтинг: 0 / 0
Открыть DBF
    #39934616
Фотография alexeyvg
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
alexeyvg
Sergey Sizov
Это из официальной доки по Visual Foxpro. Раньше ее можно было скачать, сейчас уже все ссылки битые.
Да, нашёл в нескольких описаниях по Foxpro
Но странно, что в этом описании для имени указано 11 байт, а записать можно только 10 из них...

Возможно, это ограничение именно Foxpro, и, возможно, это же ограничение используется в Microsoft.ACE.OLEDB драйвере

У ТС в файле же заняты все 11 байт, он же не в HEX-редакторе файл правил.
В общем, безобразие, даже в таком примитиве решили внести несовместимость.
...
Рейтинг: 0 / 0
Открыть DBF
    #39934626
Sergey Sizov
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
alexeyvg
Sergey Sizov
Это из официальной доки по Visual Foxpro. Раньше ее можно было скачать, сейчас уже все ссылки битые.
Да, нашёл в нескольких описаниях по Foxpro
Но странно, что в этом описании для имени указано 11 байт, а записать можно только 10 из них...

Возможно, это ограничение именно Foxpro
Не только, уж поверьте человеку, занимающемуся этим не один десяток лет., и, возможно, это же ограничение используется в Microsoft.ACE.OLEDB драйвереИменно. При этом еще и жестко. Фокс сей файл сжевал не поперхнувшись, просто игнорируя лишний символ.
У ТС в файле же заняты все 11 байт, он же не в HEX-редакторе файл правил.Надеюсь :)
В любом случае у ТС два варианта:
1. попросить изменить формат файла
2. изменить получаемые файлы самому (заменить лишние символы символом с кодом x00)
...
Рейтинг: 0 / 0
5 сообщений из 30, страница 2 из 2
Форумы / Microsoft SQL Server [игнор отключен] [закрыт для гостей] / Открыть DBF
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]