Forum Discussion

Oscar's avatar
Oscar
Contributor
3 years ago

Execute Stored Procedure on External Database

Hello- We created a connection to an external database and I can see it just fine in our Dev application. under Data Source > External Database Connection in Dashboard Data Adapters. The issue we ar...
  • JackLacava's avatar
    3 years ago

    It should be basically equivalent, but just in case it makes any difference: you can try executing the command from a rule instead. For example, as a Dashboard DataSet:

    [...]
    Case Is = DashboardDataSetFunctionType.GetDataSet
    	If args.DataSetName.XFEqualsIgnoreCase("MyDS") Then
    		Using dbConnApp As DbConnInfo = BRApi.Database.CreateExternalDbConnInfo(si, "OneStream BI Blend")
    			Dim sqlQ As String = "Select 1"
    			Dim dt As DataTable = brapi.Database.ExecuteSql(dbConnApp, sqlQ, False)
    			Return dt
    		End Using
    	End If
    [...]

    With a Data Adapter to run it: