I have an excel application which uses HANA MDX provider to connect to SAP HANA database to fetch some data. I have saved the credentials in a sheet and using connection strings to connect to HANA. But, the provider is opening a prompt popup everytime a connection happens. How to prevent the below popup if it already has connection details i.e. instead of asking user to click ok , it automatically connects without prompt?
My code to connect to HANA is this:-
With Sheets(sheet).ListObjects.Add(SourceType:=0, Source:=Array( _
"ODBC;DRIVER=" + provider + ";CS=" + databaseschema + ";SERVERNODE=" + server + ";Persist Security Info=False;" + getAuthentication + ";APP=" + app + ";" _
), Destination:=Range(Sheets(sheet).Cells(row, column).Address)).QueryTable
.commandText = commandText
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCell
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = False
.RefreshPeriod = 0
.ListObject.displayName = displayName
.PreserveColumnInfo = False
On Error Resume Next
.Refresh BackgroundQuery:=False
End With
