Ignacio
(Nacho)
1
I have the following code that performs the execution of a BAQ.
However, I don’t know how I could extract the results obtained from the query.
Ice.Contracts.DynamicQuerySvcContract tQuery = Ice.Assemblies.ServiceRenderer.GetService<Ice.Contracts.DynamicQuerySvcContract>(Db);
if (tQuery != null)
{
Ice.Tablesets.DynamicQueryTableset dsQuery = tQuery.GetByID("test");
if (dsQuery != null)
{
Ice.Tablesets.QueryExecutionTableset dsBAQ = tQuery.GetQueryExecutionParameters(dsQuery);
DataSet result = tQuery.Execute(dsQuery, dsBAQ);
//Read rows?
dsBAQ = null;
}
dsQuery = null;
tQuery.Dispose();
}
klincecum
(Kevin Lincecum)
2
foreach(var row in result.Tables[0].Rows)
{
var someColumnValue = row["ColumnName"];
}
etc
What are you trying to do?
Ignacio
(Nacho)
3
I have to extract the information from the query to insert it in some fields.
But I am having the problem when extracting the values from the query.
Message: CS0021 Cannot apply indexing with [] to an expression of type ‘object’
Olga
(Olga Klimova)
4
try : foreach(DataRow row in result.Tables[0].Rows)
2 Likes
Ignacio
(Nacho)
6
The problem was solved.
If I put an external BAQ in the BAQ name, does this work correctly?
Ignacio
(Nacho)
8
I did the test and it works.
Thank you for your help.