Forum Discussion
FredLucas
11 months agoContributor III
Hi irena_czaplicka,
You can either work with SQL tables and use SQL syntax or work with in memory DataTables and use vb.net syntax (usually not as performant for join type queries)..
The WorkflowAndEntityStatus method returns a DataSet (You can easily get the DataTable you are looking for from this DataSet object), so if you want to use this method you'd have to run a SQL query to also "convert" your other SQL query into a DataTable and do the required logic in VB.net (you can find examples in microsoft / VB.net related forums). See below for some code samples:
OS function to execute a method to return the DataSet object:
Dim objDataSet As DataSet = BRApi.Database.ExecuteMethodCommand(dbConn, methodTypeId, methodQuery, resultDataTableName, customSubVars)
How to run a sql query and get a DataTable object:
Dim strSQL As New Text.StringBuilder
strSQL.AppendLine("Select * From tableName Where 1=1")
Dim dt As New DataTable()
Using dbConn As DBConnInfo = BRApi.Database.CreateApplicationDbConnInfo(si)
dt = BRApi.Database.ExecuteSqlUsingReader(dbConn, strSQL.ToString, False)
End Using
This is one of many options you have.
Related Content
- 10 months ago
- 3 years ago
- 25 days ago
- 2 years ago
- 2 years ago