| FunctionsGetTableAsync Method |
Linkar Framework for .NET and Core
Returns a query result in a table format, synchronously only, in a asynchronous way with TABLE output format.
Namespace: Linkar.Functions.Direct.TABLEAssembly: Linkar.Functions.Direct.TABLE (in Linkar.Functions.Direct.TABLE.dll) Version: 2.3.1
Syntax public static Task<string> GetTableAsync(
CredentialOptions credentialOptions,
string filename,
string selectClause = "",
string dictClause = "",
string sortClause = "",
TableOptions tableOptions = null,
string customVars = "",
int receiveTimeout = 0
)
Public Shared Function GetTableAsync (
credentialOptions As CredentialOptions,
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:
static Task<String^>^ GetTableAsync(
CredentialOptions^ credentialOptions,
String^ filename,
String^ selectClause = L"",
String^ dictClause = L"",
String^ sortClause = L"",
TableOptions^ tableOptions = nullptr,
String^ customVars = L"",
int receiveTimeout = 0
)
static member GetTableAsync :
credentialOptions : CredentialOptions *
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
- credentialOptions CredentialOptions
- Object with data necessary to access the Linkar Server: Username, Password, EntryPoint, Language, FreeText.
- 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.Direct.TABLE;
class Test
{
public string MyGetTable()
{
string result = "";
try
{
CredentialOptions credentials = new CredentialOptions("127.0.0.1", "EPNAME", 11300, "admin", "admin");
TableOptions options = new TableOptions(RowHeaders.TYPE.MAINLABEL, false, false, false, false, false, false, false);
result = Functions.GetTableAsync(credentials, "LK.CUSTOMERS", options).Result;
}
catch (Exception ex)
{
string error = ex.Message;
}
return result;
}
}
Imports Linkar
Imports Linkar.Functions.Direct.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 options As TableOptions = New TableOptions(RowHeaders.TYPE.MAINLABEL, False, False, False, False, False, False, False);
result = Functions.GetTableAsync(credentials, "LK.CUSTOMERS",options).Result
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