Previous Topic

Next Topic

Book Contents

Book Index

Memory Tables

Memory tables are tables created temporarily to store and manipulate data. Memory tables consist of an ordered set of records, made up of fields and indexes that sort records in a defined order.

You can create a memory table using the MemoryTableBuilder Object in MaxBasic code to define properties. You can also use the Memory Table Builder to generate code to build a memory table.

Memory tables have the following methods:

Method

Description

AddIndex

Add a new index to the table definition.

Append

Add a new record to the memory table, at the end of the table.

ApplyOrder

Orders records in the memory table in the order supplied.

Cancel

Cancel pending changes that haven't been saved.

CancelRange

Cancels the range that has been set.

Clone

Copy the field and index definitions from another table and link the tables.

CopyTable

Copy the field and index definitions from another table.

Delete

Deletes the current record in the memory table.

Edit

Enter edit mode on the current record.

Empty

Clear all records from the memory table.

Find

Go to the record with the closest match to the fields supplied.

FindExact

Go to the record exactly matching the fields supplied.

First

Move to the first record in the table.

GetFieldDomain

Returns the domain of a field.

GetPropertyValue

Returns the value of a property or MaxBasic variable.

Insert

Add a new record to the memory table, at the current position.

Last

Move to the last record in the table.

Next

Move to the next record in the table.

Prev

Move to the previous record in the table.

PropertyType

Return the type of the property.

Refresh

Used when a clone has been updated, to reflect changes in the main table.

Save

Save the current record.

SetPropertyValue

Set the value of a property or MaxBasic variable.

SetRange

After an Index has been set, set a range of values, and move to the first record in the range.

SetRangeEnd

Set the end of a range.

SetRangeStart

Set the start of a range.

ShowFieldErrorHint

Show the Error Hint of the current field.

Sort

Sort the memory table by fields specified.

StartFormUpdates

When the table is bound to a grid on a form, this starts the grid being automatically updated.

StopFormUpdates

When the table is bound to a grid on a form, this stops the grid being automatically updated.

SwapDown

Move the current record up one position.

SwapUp

Move the current record down one position.

Load and Save Memory Tables

Memory tables can be loaded and saved from CSV files, delimited files or from Excel.

Method

Description

LoadFromCSV

Populate memory table from a CSV file.

LoadFromExcel

Populate memory table from an Excel file.

LoadFromFile

Populate memory table from a delimited file.

SaveToCSV

Save memory table to a CSV file.

SaveToExcel

Save memory table to an Excel file.

SaveToFile

Save memory table to a delimited file.

In This Section

MemoryTableBuilder Object

AddIndex - Memory Table Method

Append - Memory Table Method

ApplyOrder - Memory Table Method

Cancel - Memory Table Method

CancelRange - Memory Table Method

Clone - Memory Table Method

CopyTable - Memory Table Method

Delete - Memory Table Method

Edit - Memory Table Method

Empty - Memory Table Method

Find - Memory Table Method

FindExact - Memory Table Method

First - Memory Table Method

GetFieldDomain - Memory Table Method

GetPropertyValue - Memory Table Method

Insert - Memory Table Method

Last - Memory Table Method

Next - Memory Table Method

Prev - Memory Table Method

PropertyType - Memory Table Method

Refresh - Memory Table Method

Save - Memory Table Method

SetPropertyValue - Memory Table Method

SetRange - Memory Table Method

SetRangeEnd - Memory Table Method

SetRangeStart - Memory Table Method

ShowFieldErrorHint - Method

Sort - Memory Table Method

StartFormUpdates - Memory Table Method

StopFormUpdates - Memory Table Method

SwapDown - Memory Table Method

SwapUp - Memory Table Method

LoadFromCSV - Memory Table Method

LoadFromExcel - Memory Table Method

LoadFromFile - Memory Table Method

SaveToCSV - Memory Table Method

SaveToExcel - Memory Table Method

SaveToFile - Memory Table Method