Click or drag to resize
RunCompileRecordIdList Method
Compiles the record id list.

Namespace:  Biolomics.BioCallback
Assembly:  Biolomics.BioCallback (in Biolomics.BioCallback.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public static int CompileRecordIdList(
	XWhere p_Where,
	string p_TableName,
	List<string> p_FieldNames,
	string p_NewRecordName
)

Parameters

p_Where
Type: Biolomics.SharedClassesXWhere
The XWhere statement to use for laoding records.
p_TableName
Type: SystemString
The table name to run the query on.
p_FieldNames
Type: System.Collections.GenericListString
List of field names to be used to compile recodidlist.
p_NewRecordName
Type: SystemString
Name of the new record.

Return Value

Type: Int32
Error code.
Examples
This is an example of use of Compile record id list.
Example VB.Net
Imports System
Imports BioloMICS.BioCallback
Imports BioloMICS.SharedClasses
Imports Biolomics.Utility.DatabaseConstants
Imports System.Collections

Public Class Program

    <STAThread()>
    Shared Sub Main()
        Dim program As New Program
        program.CompileREcordIdList()
    End Sub

    '    Write sub functions here
    Public Sub CompileREcordIdList()
        '    get the current connection
        Dim SqlCo As XConnection = Run.GetCurrentConnection()
        If SqlCo Is Nothing Then
            Return
        End If

        '    get the current layout 
        Dim CurrentLayout As XDataLayout = Run.GetCurrentLayout()
        If CurrentLayout Is Nothing Then
            Return
        End If

        '    get the current table displayed in that layout
        Dim TableDef As XTableDef = SqlCo.GetTableDef(CurrentLayout.TableKey)
        If TableDef Is Nothing Then
            Return
        End If

        '    load all records
        Dim Where As XWhere = XWhere.Lte(StaticFields.id, 8)
        Dim fieldnames As New Generic.List(Of String)
        fieldnames.Add("Sequence")
        fieldnames.Add("Country")

        Dim newrecordName As String = "New Compiled record"

        'run compilerecordidlist
        run.CompileRecordIdList(Where, TableDef.UserName, fieldnames, newrecordName)
        'draw error messages if exists
        DrawMessages()
    End Sub

    '    display all recent error messages
    Public Sub DrawMessages()
        Dim ErrorList As Generic.List(Of String) = Run.GetLastErrorMessage()
        For Each errorMsg As String In ErrorList
            Console.Write(vbcrlf & errorMsg)
        Next
    End Sub

End Class
See Also