Table_CopyShrinkRecords()

Examples


The Table_CopyShrinkRecords() function copies a record from the original table to the temporary table created using Table_StartShrink().

Syntax

Table_CopyShrinkRecords(product_ID, table table_name)

Parameters

product_ID – An integer specifying the product ID of the dictionary containing the table being shrunk.

table table_name The original table being shrunk.

Return value

An integer describing the result of the transfer. The result is 0 if the record was copied successfully. Any other value indicates a record transfer error. The following list shows the errors and their corresponding integer values:

[spacer]

0 – No error

20 – Transaction in progress

1 – Low on memory

21 – Not a variable length table

2 – Database manager not initialized

22 – No table definition could be found

3 – Database manager not supported

23 – Attempted to lock two records

4 – Too many tables opened

24 – No lock on update

5 – Record length too long

25 – Table doesn’t match definition

6 – Too many keys for database type

26 – The disk is full

7 – Too many segments

27 – Unknown error

8 – Table not registered

28 – A non-modifiable key changed

9 – Table not found

29 – Not a variable length field

10 – Locked record

30 – A record was changed with a passive lock

11 – Table name error

31 – Deadlocked

12 – Table not open

32 – Path not found

13 – Table not opened exclusive

33 – Buffer error

14 – Invalid command sent to database manager

34 – Error in creating a P.SQL table

15 – Key number doesn’t exist

35 – Invalid key definition

16 – End of file

36 – Maximum number of SQL connections reached.

17 – Duplicate record

37 – Error accessing SQL data

18 – Table is missing

38 – Error converting SQL data

19 – A set is already active

39 – Error generating SQL data


Comments

This function is used in the table shrinking process. Shrinking is the process of removing unused space from a data table. The Table_CopyShrinkRecords() function copies the contents of the original table to the temporary table created with Table_StartShrink(). This transfer allows the temporary table to store only records from the original table; excess space in the original table isn’t transferred to the temporary table. After all records have been copied, Table_EndShrink() finishes the table shrink.


Documentation Feedback