ApolloTable Methods

<< Click to Display Table of Contents >>

Navigation:  Apollo .NET (API Reference) >

ApolloTable Methods

Namespace: Apollo

Method

Description

AddDudenCollation()

Adds Duden collation rule to the sort order.

AddEtecCollation()

Adds ETEC collation rule to the sort order

Alias(workArea As Integer)

Retrieves the table alias name assigned to the current work area when the table was opened.  If parameter is passed as zero (0), the alias name of the current work area is returned.

Append()

Appends a new blank record to the current database. This method or ApolloTable.Append must be called whenever a new record is to be added to the database.

AppendBlank()

 

AppendBlankEx() As String

A blank record added via ApolloTable.AppendBlankEx is automatically locked.

AppendEx() As String

Append a record to the database using the current contents of the record buffer. Use ApolloTable.AppendEx in situations where the user has the ability to cancel an intended record addition. If the record addition is canceled, a record does not have to be deleted from the database, as is the case with ApolloTable.AppendBlank.

AppendFrom(ByVal cpFileName As String, ByVal iSourceType As Integer, ByVal cpScopeExpr As String) As Short

Appends data from a source table to the current table.All fields with matching names and types are appended to the current table. If field length differs, data in the destination table is either truncated or padded with spaces. Deleted records in the source file are not appended to the target table.

fileName : The name of the source database including full path and extension information if desired.The type of the source database must be the same as the type of the current database (i.e., if the current database is SDENTX, the source database must also be SDENTX).

sourceType : One of the RDE types

scopeExpr : An xBase expression defining a filtered subset to be applied to the source database (e.g., "upper(trim(city)) = 'LOS ANGELES'").

If all of the records in the source file are to be appended, pass the parameter as null. In Visual Basic pass it as Nothing.

Returns :  True or False - If the append is successful, true is returned. If the function fails, false is returned. If the source file is empty, true is returned.

 

BaseDate() As String

Retrieves the date on which the table was last opened for read/write access.

BaseName() As String

Extracts the DOS path and file name attached to the current work area.

BlobToFile(ByVal cpFieldName As String, ByVal cpFilename As String) As Short

Writes a BLOB stored in a memo file directly to a new disk file. If a file of the same name exists, it is overwritten without warning.

BOF() As Boolean

Tests if a skip (Move) has been attempted that would place the record pointer before the first record in the file (BOF - beginning of file).

Close()

Close the table (including all associated index files) and release allocated memory. Hot record buffers are flushed to disk before closing.

CloseIndexes()

Closes all open index files attached to the current table.

Commit()

Writes the contents of the record buffer to the current file position.

CommitLevel(ByVal newLevel As Integer) As Integer

clFull = slowest (always flush buffers and write data to disk)

clNormal = fast (flush SDE but use Windows buffers)

clNone = fastest (use Apollo and Windows buffers

CopyFile(ByVal cpToFileName As String) As Integer

Copy the current data table to another file.

textFileName : The name of the target text file including full path and extension if desired. An existing file with the same name will be overwritten.

fileType : File type

Returns : True or False depending on the outcome of the operation.

CopyFileText(ByVal cpTextFileName As String, ByVal iFileType As Short) As Integer

Copy the current data table to an ASCII text file. The text file may be formatted as either comma delimited or SDF (system data format).

CopyStructure(ByVal cpFilename As String, ByVal cpAlias As String) As Integer

Creates a table that has the same structure as the current table. The new file is created and then closed.

filename : The DOS name of the target file qualified with a complete path and extension.

alias :  The alias name to be assigned to the new file. Every database file opened must be assigned a unique alias name.

Returns : True or False depending upon the outcome of the operation.

CopyStructureExtended(ByVal cpFilename As String) As Integer

Creates a table that holds the record structure of the currently selected file.

Count() As Integer

Extracts the number of records in the table.

CreateExec() As Integer

Creates a table in the work area set up via ApolloTable.CreateNew and according to the field specifications defined with ApolloTable.CreateField.

CreateField(ByVal cpName As String, ByVal cpType As String, ByVal iLength As Short, ByVal iDecimals As Short)

Defines a field to be included in a new table. A new file is created by first making a work area with ApolloTable.CreateNew (which also defines the number of fields that the table will contain). Each field is then defined with ApolloTable.CreateField, and the file is finally physically created by calling ApolloTable.CreateExec.

name : The name of the field. Valid field names begin with a letter and may contain letters, numbers, and the underscore character. Field name maximum length is ten characters.

type :  Field data type

length : Field length

decimals : The number of decimal positions if the field type is numeric

CreateFrom(ByVal cpFilename As String, ByVal cpAlias As String, ByVal cpStruFile As String, ByVal iRdeType As Short) As Integer

 

 

CreateNew(ByVal cpFilename As String, ByVal cpAlias As String, ByVal iRdeType As Short, ByVal iNumFields As Short) As Short

 

CreateNewEx(ByVal cpFilename As String, ByVal cpAlias As String, ByVal iRdeType As Short, ByVal iNumFields As Short, ByVal uiMode As Int64) As Short

 

DbfDecrypt() As Integer

 

DbfEncrypt() As Integer

 

DBFilter() As String

 

DBRlockList(ByVal vpVar() As Long)

 

Decrypt(ByVal cpBuffer As String, ByVal cpPassword As String, ByVal iBuffLen As Integer) As String

 

Delete()

 

Deleted() As Integer

 

Descend(ByVal cpKeyString As String) As String

 

Dispose() Implements IDisposable.Dispose

 

Empty(ByVal cpFieldName As String) As Short

 

Encrypt(ByVal cpBuffer As String, ByVal cpPassword As String, ByVal iBuffLen As Integer) As String

 

EOF() As Boolean

 

ErrorLevel(ByVal iErrorLevel As Short) As Short

 

ErrorTest() As Integer

 

EvalLogical(ByVal cpExpression As String) As Integer

 

EvalNumeric(ByVal cpExpression As String) As Double

 

EvalString(ByVal cpExpression As String) As String

 

EvalTest(ByVal cpExpression As String) As Short

 

ExtractFileName(ByVal s As String) As String

 

ExtractFilePath(ByVal s As String) As String

 

ExtractFileTitle(ByVal s As String) As String

 

FieldCount() As Short

 

FieldDecimals(ByVal cpFieldName As String) As Short

 

FieldName(ByVal uiFieldNum As Short) As String

 

FieldNum(ByVal cpFieldName As String) As Short

 

FieldOffset(ByVal cpFieldName As String) As Short

 

FieldType(ByVal cpFieldName As String) As String

 

FieldWidth(ByVal cpFieldName As String) As Short

 

FilterAlias(ByVal cpAliasName As String, ByVal cpFieldName As String) As Integer

 

FilterDlg(ByVal hwnd As Integer, ByVal cpExpr As String, ByVal cpCaption As String, ByVal iHasIndexList As Short) As String

 

Flock() As Integer

 

Found() As Integer

 

GetBitMap(ByVal cpFieldName As String, ByVal hwnd As Integer) As Integer

 

GetBlob(ByVal cpFieldName As String, ByVal vpVar As String) As Integer

 

GetBlobLength(ByVal cpFieldName As String) As Integer

 

GetByte(ByVal cpFieldName As String) As String

 

GetDateFormat() As Integer

 

GetDateJulian(ByVal cpFieldName As String) As Integer

 

GetDateString(ByVal cpFieldName As String) As String

 

GetDouble(ByVal sFieldName As String) As Double

 

GetInteger(ByVal sFieldName As String) As Integer

 

GetLogical(ByVal sFieldName As String) As Boolean

 

GetLong(ByVal sFieldName As String) As Long

 

GetMemo(ByVal cpFieldName As String, Optional ByVal LineWidth As Short = 0) As String

 

GetQueryBit(ByVal lRecNum As Integer) As Integer

 

GetRecord(ByRef cpRecord As String)

 

GetScope(ByVal iWhichScope As Short) As String

Gets the original value of a scoping string passed to ApolloTable.SetScope().

GetString(ByVal sFieldName As String) As String

 

GetSystemCharOrder() As String

 

GetSystemLocale() As String

 

GetTrimString(ByVal sFieldName As String) As String

 

GetUDFPath(ByVal cpUDFPath As String, ByVal lMaxBufLen As Integer)

 

Go(ByVal lRecNum As Integer)

 

GoBottom()

 

GoTop()

 

Index(ByVal sFileName As String, ByVal sExpr As String, ByVal iOption As Short, ByVal bDescend As Boolean, ByVal sCondition As String) As Short

 

IndexClose()

 

IndexCondition() As String

 

IndexFlip() As Integer

 

IndexKey() As String

 

IndexKeyField() As String

 

IndexName(ByVal iIndex As Short) As String

 

IndexOpen(ByVal cpFilename As String) As Short

 

IndexOrd() As Short

 

IndexTag(ByVal cpFilename As String, ByVal cpTagName As String, ByVal cpExpr As String, ByVal iOption As Short, ByVal bDescend As Integer, ByVal cpCondition As String) As Short

 

IndexType() As Short

 

IsEncrypted(ByVal iFileOrRec As Short) As Integer

 

IsNull(ByVal sFieldName As String) As Boolean

 

KeyAdd(ByVal cpTagName As String) As Integer

 

KeyData() As String

 

KeyDrop(ByVal cpTagName As String) As Integer

 

KeyLength() As Integer

 

Locate(ByVal cpExpression As String, ByVal iDirection As Short, ByVal bContinue As Integer) As Integer

 

LockCount() As Short

 

Locked(ByVal lRecNum As Integer) As Integer

 

MemAlloc(ByVal lNumberofBytes As Integer) As Buffer

 

MemDealloc(ByVal vpPtr As Buffer)

 

MemRealloc(ByVal vpPtr As Buffer, ByVal lSize As Integer) As Buffer

 

New()

 

Open() As Integer

 

OrderPosGet() As Double

 

OrderPosSet(ByVal dPosition As Double)

 

OrderRecNo() As Integer

 

OrdSetFocus(ByVal cTagName As String) As Short

 

Pack()

 

PutBlob(ByVal cpFieldName As String, ByRef vpData As Byte, ByVal lSize As Integer) As Integer

 

PutDate(ByVal cpFieldName As String, ByVal dVal As Date)

 

PutDateString(ByVal cpFieldName As String, ByVal sVal As String)

 

PutDouble(ByVal cpFieldName As String, ByVal dVal As Double)

 

PutInteger(ByVal cpFieldName As String, ByVal iVal As Integer)

 

PutLogical(ByVal cpFieldName As String, ByVal bVal As Boolean)

 

PutLong(ByVal cpFieldName As String, ByVal iVal As Integer)

 

PutMemo(ByVal cpFieldName As String, ByVal sVal As String)

 

PutRecord(ByVal cpRecord As Buffer)

 

PutString(ByVal cpFieldName As String, ByVal sVal As String)

 

Query(ByVal sExpression As String) As Integer

 

QueryRecCount() As Integer

 

QueryTest(ByVal cpExpression As String) As Short

 

Recall()

 

RecCount() As Integer

 

Reindex()

 

Replace(ByVal cpFieldName As String, ByVal iDataType As Short, ByRef vpData As Byte)

 

Rlock(ByVal lRecNum As Integer) As Integer

 

RYOFilterActivate(ByVal iFilterHandle As Short, ByVal iBoolOperation As Short) As Integer

 

RYOFilterCopy() As Short

 

RYOFilterCreate() As Short

 

RYOFilterDestroy(ByVal iFilterHandle As Short) As Integer

 

RYOFilterGetBit(ByVal iFilterHandle As Short, ByVal lRecNo As Integer) As Integer

 

RYOFilterRestore(ByVal cpFilename As String) As Integer

 

RYOFilterSave(ByVal iFilterHandle As Short, ByVal cpFilename As String) As Integer

 

RYOFilterSetBit(ByVal iFilterHandle As Short, ByVal lRecNo As Integer, ByVal iOnOrOff As Short) As Integer

 

RYOKeyAdd(ByVal cpTagName As String, ByVal cpKey As String) As Integer

 

RYOKeyDrop(ByVal cpTagName As String) As Integer

 

Seek(ByVal cpKeyValue As String) As Boolean

Searches the current order for a supplied key. Like a Find() call.

keyValue : The value to search for. If the key is numeric, transform it to a string before passing it to ApolloTable.Seek(). The string will be transformed back to a number before performing the seek. Dates must be passed as strings in DTOS form (CCYYMMDD). Pass search keys to logical indexes as "T" or "F".

Returns : True if the key was found and False if not. If the return is False, ApolloTable.Found() will be False and ApolloTable.Eof() will be True.

SeekBin(ByVal cpKeyValue As String, ByVal iLength As Short) As Boolean

Searches the current order for a supplied key. The key may contain binary zeroes.

keyValue : The binary value to search for. The search key value may be a partial key (if ApolloTable.SetExact() is not True).

length : The length of the search key.

Returns : True if the key was found and False if not. If the return is False, ApolloTable.Found() will be False and ApolloTable.Eof() will be True.

SelectWA(ByVal iBaseArea As Short)

 

SetCentury(ByVal iValue As Boolean)

 

SetCollationRule(ByVal lRuleType As Short, ByVal cpSrcSymbSet As String, ByVal cpDstSymbSet As String, ByVal bResetPrev As Short, ByVal bOem As Short, ByVal lReserved As Short) As Short

 

SetDateFormat(ByVal uiDateType As Short)

 

SetDeleted(ByVal uiDeleted As Boolean)

 

SetEpoch(ByVal iBaseYear As Short) As Short

Determines the interpretation of date strings with only two year digits. When such a string is converted to a date value, its year digits are compared with the year digits of baseYear. If the year digits in the date are greater than or equal to the year digits of baseYear, the date is assumed to fall within the same century as baseYear. Otherwise, the date is assumed to fall in the following century.

SetErrorHook(ByVal uiErrorHook As Short)

 

SetExact(ByVal uiOnOff As Boolean)

 

SetFilter(ByVal cpExpression As String)

 

SetGaugeHook(ByVal hwndGauge As Integer)

 

SetHandles(ByVal iNumHandles As Short) As Short

 

SetLockTimeout(ByVal iSeconds As Short)

 

SetMemoBlockSize(ByVal iBlockSize As Short) As Short

 

SetOrder(ByVal iIndex As Short) As Short

 

SetPassword(ByVal cpEncodeKey As String)

 

SetQueryBit(ByVal lRecNum As Integer, ByVal bValue As Integer)

 

SetRelation(ByVal uiChildArea As Short, ByVal cpKeyExpr As String)

 

SetScope(ByVal cpLowVal As String, ByVal cpHighVal As String) As Integer

Sets formal scope. The scope value is matched against the leftmost characters of the CURRENT index expression.

lowVal : The low scope value. The first record with this key (or the immediately greater if this key does not exist) will become logical top of file.

highVal : The high scope value. If there is no high value, pass this parameter as a NULL string.

Returns : True if scope set successfully and False if not.

SetSoftSeek(ByVal uiOnOff As Short)

Indicates whether or not index seeks that result in failure (i.e., the requested key value does not match any key in the index order either partially or exactly) should result in a successful conclusion if a key is found that is immediately greater than the requested key.

SetStringType(ByVal uiStringType As Short)

 

SetTranslate(ByVal uiOnOff As Short)

 

SetTurboRead(ByVal uiOnOff As Short)

 

Skip(Optional ByVal iNumOfRecs As Integer = 1)

 

SysProp(ByVal uiOnOff As Short, ByVal vpData As Buffer) As Integer

 

TagArea(ByVal cpTagName As String) As Short

 

TagName(ByVal iIndex As Short) As String

 

Unlock(ByVal lRecNum As Integer)

 

Version() As String

 

vs_PutVariant (ByVal cpFieldName As String, ByVal lpVariant As Object)

 

Zap()