| LinkarClientGetTableAsync Method |
Linkar Framework for .NET and Core
Returns a query result in a table format, synchronously only, with TABLE output format.
Namespace: Linkar.Functions.Persistent.TABLEAssembly: Linkar.Functions.Persistent.TABLE (in Linkar.Functions.Persistent.TABLE.dll) Version: 2.3.1
Syntax public Task<string> GetTableAsync(
string filename,
string selectClause = "",
string dictClause = "",
string sortClause = "",
TableOptions tableOptions = null,
string customVars = "",
int receiveTimeout = 0
)
Public Function GetTableAsync (
filename As String,
Optional selectClause As String = "",
Optional dictClause As String = "",
Optional sortClause As String = "",
Optional tableOptions As TableOptions = Nothing,
Optional customVars As String = "",
Optional receiveTimeout As Integer = 0
) As Task(Of String)
public:
Task<String^>^ GetTableAsync(
String^ filename,
String^ selectClause = L"",
String^ dictClause = L"",
String^ sortClause = L"",
TableOptions^ tableOptions = nullptr,
String^ customVars = L"",
int receiveTimeout = 0
)
member GetTableAsync :
filename : string *
?selectClause : string *
?dictClause : string *
?sortClause : string *
?tableOptions : TableOptions *
?customVars : string *
?receiveTimeout : int
(* Defaults:
let _selectClause = defaultArg selectClause ""
let _dictClause = defaultArg dictClause ""
let _sortClause = defaultArg sortClause ""
let _tableOptions = defaultArg tableOptions null
let _customVars = defaultArg customVars ""
let _receiveTimeout = defaultArg receiveTimeout 0
*)
-> Task<string>
Parameters
- filename String
- File or table name defined in Linkar Schemas. Table notation is: MainTable[.MVTable[.SVTable]]
- selectClause String (Optional)
- Statement fragment specifies the selection condition. For example WITH CUSTOMER = '1'
- dictClause String (Optional)
- Space-delimited list of dictionaries to read. If this list is not set, all fields are returned. For example CUSTOMER DATE ITEM. In NONE mode you may use the format LKFLDx where x is the attribute number.
- sortClause String (Optional)
- Statement fragment specifies the selection order. If there is a selection rule Linkar will execute a SSELECT, otherwise Linkar will execute a SELECT. For example BY CUSTOMER
- tableOptions TableOptions (Optional)
- Detailed options to be used, including: rowHeaders, rowProperties, onlyVisibe, usePropertyNames, repeatValues, applyConversion, applyFormat, calculated, pagination, regPage, numPage.
- customVars String (Optional)
- Free text sent to the database allows management of additional behaviours in SUB.LK.MAIN.CONTROL.CUSTOM, which is called when this parameter is set.
- receiveTimeout Int32 (Optional)
- Maximum time in seconds that the client will wait for a response from the server. Default = 0 to wait indefinitely.
Return Value
TaskStringThe results of the operation.
Remarks
TABLE output format uses the defined control characters in
EntryPoints Parameters Table Row Separator and Column Row Separator.
By default:
- TAB char (9) for columns.
- VT char (11) for rows.
Example using Linkar;
using Linkar.Functions.Persistent.TABLE;
class Test
{
public string MyGetTable()
{
string result = "";
try
{
CredentialOptions credentials = new CredentialOptions("127.0.0.1", "EPNAME", 11300, "admin", "admin");
LinkarClient client = new LinkarClient();
client.Login(credentials);
TableOptions options = new TableOptions(RowHeaders.TYPE.MAINLABEL, false, false, false, false, false, false, false);
result = client.GetTableAsync("LK.CUSTOMERS", options).Result;
client.Logout();
}
catch (Exception ex)
{
string error = ex.Message;
}
return result;
}
}
Imports Linkar
Imports Linkar.Functions.Persistent.TABLE
Class Test
Public Function MyGetTable() As String
Dim result As String = ""
Try
Dim credentials As CredentialOptions = New CredentialOptions("127.0.0.1", "EPNAME", 11300, "admin", "admin")
Dim client As LinkarClient = New LinkarClient()
client.Login(credentials)
Dim options As TableOptions = New TableOptions(RowHeaders.TYPE.MAINLABEL, False, False, False, False, False, False, False);
result = client.GetTableAsync("LK.CUSTOMERS",options).Result
client.Logout()
Catch ex As Exception
Dim[error] As String = ex.Message
End Try
Return result
End Function
End Class
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
See Also