Quantcast
Viewing all articles
Browse latest Browse all 3636

No connection to DB SAP Hana

Hello,

 

I have a problem trying to connect a report to a SAP Hana DataBase. My code looks like this:

 

private void _conecta(ReportDocument aRpt)
{        string sServidor;        TableLogOnInfo tablaLI;        //sServidor = "Driver={LIBODBCHDB32};ServerNode=" + _sConexion.sServidor + ";Database=" + _sConexion.sBD;        //sServidor = "Driver={B1CRHPROXY32};ServerNode=" + _sConexion.sServidor + ";Database=" + _sConexion.sBD;        //sServidor = "Driver={B1CRHPROXY32};ServerNode=" + _sConexion.sServidor + ";CS=" + _sConexion.sBD;        sServidor = "Driver={HDBODBC32};ServerNode=" + _sConexion.sServidor + ";CS=" + _sConexion.sBD;    foreach (Table tabla in aRpt.Database.Tables)    {        tablaLI = tabla.LogOnInfo;                     //tablaLI.ConnectionInfo.ServerName = _sConexion.sServidor;        tablaLI.ConnectionInfo.ServerName = sServidor;        tablaLI.ConnectionInfo.DatabaseName = _sConexion.sBD;        tablaLI.ConnectionInfo.UserID = _sConexion.sUsuario;        tablaLI.ConnectionInfo.Password = _sConexion.sPwd;        tabla.ApplyLogOnInfo(tablaLI);    }    aRpt.Refresh();
}

This code works perfectly with a SQL Server DB.

 

I think the problem is that I want to connect the report to a schema of the DB instead of to a DB because SAP Hana has only one DB with many schemas.

 

I saw in other dicussion that I have to pass the conection string in the server property, but this not work for me. As you can see I've tried diferent ways to pass the connection string trying to use the ODBC connection (HDBODBC32) instead of CR driver connector (B1CRHPROXY32).

 

As the result I get:

 

Image may be NSFW.
Clik here to view.
CR_SAP_Hana.jpg

 

Then if I write the password for the SYSTEM I get the message "It's not possible to connect. Try again".

 

Thanks in advance.


Viewing all articles
Browse latest Browse all 3636

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>