Design In Context
APIs
: GetDatabySearch
GetDatabySearch
Searches data on DashBoard site for given criteria and for given searchable object type.
Syntax:
Public static bool GetDatabySearch (
string strURL,
string strCriteria,
string strObjectTypeHandle,
bool bFilesOnly,
out string strErrorMessage,
out System.Data.DataTable dtSearchedData
)
Parameters:
strURL - The dashboard URL to be queried for getting data
strCriteria - Tag to be searched
strObjectTypeHandle - Handle of object type to search data in
bFilesOnly - Flag to specify file search only
strErrorMessage - When this method returns, contains the error message, if fails otherwise, contains String.Empty
dtSearchedData - When this method returns, contains the DataTable of data related to criteria from DashBoard, if tag has any data on DashBoard otherwise, contains empty DataTable
Return value:
true if success; otherwise, false.
Example:
string strMessage = string.Empty;
System.Data.DataTable dtTable = new System.Data.DataTable();
if (GetDatabySearch (
"http://inhyzvms8r09:16000/",
"J-9002A",
" LOGICAL (& OTHER PHYSICAL) OBJECT",
true,
out strMessage, out dtTable))
{
Console.WriteLine("No. of records in returned data - {0}", dtTable.Rows.Count);
}
else
{
Console.WriteLine("Failed - Error - {0}", strMessage);
}
1974 to current year.
AVEVA Solutions Limited and its subsidiaries. All rights reserved.