Forum Discussion
JennyC
10 hours agoNew Contributor III
Hi,
If it is in the same environment, you can connect to another app using the below method.
I was able to read and import.
Dim oar As New OpenAppResult
Dim osi As SessionInfo = BRApi.Security.Authorization.CreateSessionInfoForAnotherApp(siSource, appName, openAppResult)
If oar = OpenAppResult.Success Then
Dim SourceSQL As String = $"Select SQL"
Dim SourceTable As New DataTable
Using dbconn As DbConnInfoApp = BRApi.Database.CreateApplicationDbConnInfo(osi)
SourceTable = BRApi.Database.ExecuteSql(dbconn, SourceSQL, True)
If SourceTable.Rows.Count > 0 Then
api.Parser.ProcessDataTable(Osi, SourceTable, False, api.ProcessInfo)
End If
End Using
End If
osi.CloseApplication
Thanks,
Jenny
Related Content
- 6 years ago
- 2 years ago
- 2 years ago
- 2 years ago