Backend-Specific Elements

Certain child elements of <Table> apply only to specific SQL backends. Include only the elements that match your target database.

MSSQLBulkCopy (Microsoft SQL Server)

The <MSSQLBulkCopy> element controls how data is copied from Btrieve to Microsoft SQL Server using the bulk copy API. If this element is present inside a <Table>, data copying is enabled for that table.

<Table Name="Person" Schema="dbo">
  <MSSQLBulkCopy BulkCopyByRowCount="500" LockTable="y"/>
  <!-- ... -->
</Table>

Attributes

Attribute

Required

Default

Description

BulkCopyByRowCount

No

500

Number of rows per batch during bulk copy. The driver adjusts this based on the total record count (up to 5000) if not explicitly set. Do not specify both BulkCopyByRowCount and BulkCopyByKBytes.

BulkCopyByKBytes

No

(none)

Kilobytes per batch during bulk copy. When set, this takes precedence over BulkCopyByRowCount. Use one or the other, not both.

LockTable

No

y

Whether to lock the entire table on the server during data copy.

  • y — Apply a TABLOCK hint for faster bulk inserts.

  • n — Do not lock the table (allows concurrent access but may be slower).

OracleTableSpaces (Oracle)

The <OracleTableSpaces> element specifies which Oracle tablespaces to use when creating the table, indexes, and variable-record storage.

<Table Name="Person" Schema="">
  <OracleTableSpaces Table="DATA_TS" Index="INDEX_TS" VarRecs="BLOB_TS"/>
  <!-- ... -->
</Table>

Attributes

Attribute

Required

Default

Description

Table

Yes

(none)

Tablespace name for table data storage.

Index

Yes

(none)

Tablespace name for index storage.

VarRecs

No

(default)

Tablespace name for variable-length record data. The tail end of variable-length Btrieve records is stored as BLOBs; this specifies which tablespace holds that data.

OracleTableStorage (Oracle)

The <OracleTableStorage> element configures Oracle storage parameters for the table’s physical allocation.

<Table Name="Person" Schema="">
  <OracleTableSpaces Table="DATA_TS" Index="INDEX_TS"/>
  <OracleTableStorage PercentFree="10" PercentUsed="85"
                      Initial="8" Next="1"/>
  <!-- ... -->
</Table>

Attributes

Attribute

Required

Default

Description

PercentFree

Yes

(none)

Oracle PCTFREE value — the percentage of each data block reserved for future updates to existing rows.

PercentUsed

Yes

(none)

Oracle PCTUSED value — the minimum percentage of used space in a block before Oracle considers it available for new row inserts.

Initial

Yes

(none)

Initial extent size (in Oracle allocation units) for the table.

Next

Yes

(none)

Size of subsequent extents (in Oracle allocation units) when the table needs more space.

Backend Element Placement

When using DTD validation, the backend-specific elements must appear in the correct position within the <Table> element. The DTD defines the content model as:

  • For MSSQL: MSSQLBulkCopy must appear before Fields and Indices.

  • For Oracle: OracleTableSpaces and OracleTableStorage must appear before Fields and Indices.

Only include the elements for your target backend. Do not mix MSSQL and Oracle elements in the same <Table>.

Note

In practice, the code does not strictly enforce this ordering. However, following the DTD order ensures the XML validates correctly if DTD validation is enabled.