Skip to main content
All docs
V24.2

HanaConnectionParameters Class

Stores SAP HANA connection parameters.

Namespace: DevExpress.DataAccess.ConnectionParameters

Assembly: DevExpress.DataAccess.v24.2.dll

Declaration

public class HanaConnectionParameters :
    SqlServerConnectionParametersBase,
    IConnectionPagePort

Remarks

HanaConnectionParameters contains connection parameters required to establish a SAP HANA database server connection:

ServerName
Gets or sets the name of the SAP HANA database server to which the connection should be established.
PortNumber
Specifies the port number to connect to SAP HANA databases.
UserName
Gets or sets the user name used to authenticate to the SAP HANA database server.
Password
Gets or sets the password used to authenticate to the SAP HANA database server.
DatabaseName
Gets or sets the name of the tenant database that contains the required data. If you do not specify DatabaseName, the system database is used instead.

Example

The following code snippet shows how to supply a Report with data from the SAP HANA database:

using DevExpress.DataAccess.ConnectionParameters;
using DevExpress.DataAccess.Sql;
using DevExpress.XtraReports.UI;
using System.Windows.Forms;

public partial class Form1 : Form {
        public Form1() {
            InitializeComponent();
            // Configures connection parameters.
            HanaConnectionParameters hanaParams = new HanaConnectionParameters();
            hanaParams.ServerName = "hxehost";
            hanaParams.PortNumber = 39015;
            hanaParams.UserName = "SYSTEM";
            hanaParams.Password = "17Me7P7n4";
            // Creates a data source with the specified connection settings.
            SqlDataSource sqlDataSource = new SqlDataSource("Data Source 1", hanaParams);
            // Retrieves data from the data source.
            SelectQuery selectQuery = SelectQueryFluentBuilder
                .AddTable("Northwind.Order Details")
                .SelectColumns("UnitPrice", "OrderID", "Quantity")
                .Build("Query 1");
            sqlDataSource.Queries.Add(selectQuery);
            sqlDataSource.Fill();
            // Creates a report and binds it to data.
            XtraReport report = new XtraReport();
            report.DataSource = new SqlDataSource(hanaParams);
        }
}

Refer to the following help topics for more information on how to configure connection parameters for the SAP HANA database in the UI and code:

See Also