<< Click to Display Table of Contents >> Navigation: Apollo API Listing > sx_WorkArea |
Declare Function sx_WorkArea Lib "Apollo9.dll"
(ByVal cpAlias As Any)
As Integer
USHORT FAR PASCAL sx_WorkArea
(BYTEP cpAlias);
Retrieves the table numeric work area identifier associated with a given alias name. This function is the inverse of sx_Alias, which retrieves the alias name assigned to a given work area.
Parameters
cpAlias: A variable or literal string containing the alias name assigned to the database when the file was opened. If passed as a NULL string the current work area integer is returned.
The number assigned to the work area when the file was opened. If there is no active work area, zero (0) is returned.
' Display database info
Text1.Text = sx_WorkArea(0&)
Text2.Text = sx_BaseName()
BYTE caString[256];
sx_Select(sx_WorkArea("master"));
sx_GoTop();
while (!sx_Eof())
{
sx_GetRecord((BYTEP) caString);
// if rec not deleted, copy it
if (caString[0] != '*')
{
sx_Select(sx_WorkArea("copy"));
sx_AppendBlank();
sx_PutRecord((BYTEP) caString);
}
sx_Select(sx_WorkArea("master"));
sx_Skip(1L);
}