Symphony Framework
ReadFirst Method
Example 
Symphony.dB Namespace > DBAccess Class : ReadFirst Method
The key of reference.
The returned data area.
Read the first available row (record) from the table. The key of reference defines the sequence/key to use.
Syntax
public DBResponse ReadFirst( 
   int keyOfReference,
   out string dataArea
)

Parameters

keyOfReference
The key of reference.
dataArea
The returned data area.

Return Value

Returns a value indicating the status of the call.
Remarks
The first row (record) in the table is returned. the keyOfReference is used to determine the table index to use with zero being the primary index.
Example
string itemRecord;
Int32 chan;
Symphony.dB.DBAccess itemAccess = new DBAccess("ITEM", "DATABASE:DatabaseManager");
if (itemAccess.OpenInput(out chan) == DBResponse.DBOK)
{
    switch (itemAccess.ReadFirst(0, out itemRecord))
    {
        case DBResponse.DBOK:
            break;
        case DBResponse.DBNotFound:
            break;
        case DBResponse.DBDuplicateKey:
            break;
        case DBResponse.DBNoCurrentRecord:
            break;
        case DBResponse.DBEOF:
            break;
        case DBResponse.DBLocked:
            break;
        case DBResponse.DBFatal:
            break;
        default:
            break;
    }
}
string itemRecord;
Int32 chan;
Symphony.dB.DBAccess itemAccess = new DBAccess("ITEM", "DATABASE:DatabaseManager");
if (itemAccess.OpenInput(out chan) == DBResponse.DBOK)
{
    switch (itemAccess.ReadFirst(0, out itemRecord))
    {
        case DBResponse.DBOK:
            break;
        case DBResponse.DBNotFound:
            break;
        case DBResponse.DBDuplicateKey:
            break;
        case DBResponse.DBNoCurrentRecord:
            break;
        case DBResponse.DBEOF:
            break;
        case DBResponse.DBLocked:
            break;
        case DBResponse.DBFatal:
            break;
        default:
            break;
    }
}
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

DBAccess Class
DBAccess Members