Hi Bhanu,
We were able to set the connection between HANA and BP by following below steps.
First step was to install the HANA Application. This package usually will include the HANA ODBC drivers as well.
Read :
https://www.kodyaz.com/visual-studio/connect-to-sap-hana-database-using-odbc-sample-code.aspxOnce the Studio, Client and the HANA ODBC Drivers are installed we can go ahead and try to establish the connection to the HANA DB.
We were able to establish connection to the HANA DB using Powershell Script.
This below code will establish a connection and a query is passed where we are getting the data from a sample DB and the output is saved as a txt file.
$conn = new-object System.Data.Odbc.OdbcConnection
$conn.connectionstring = "DSN=HDBODBC;UID=USERNAME;PWD=PASSWORD;SERVERNODE=abcxxxxx.xx.xx.xxxxx.com:xxxxx;DATABASENAME=DataBaseNAME"
$conn.Open()
$result =(new-Object Data.Odbc.OdbcCommand("select * from DATA_TYPES",$conn)).ExecuteReader()
$table = new-object "System.Data.DataTable"
$table.Load($result)
$table | Out-File C:\RPA\output.txt
$conn.close()
Hope this help you!
Thanks,
Vikash
------------------------------
Vikash Anand
Application Development Team Lead
Accenture
------------------------------