Sap.Data.Hana.Net.v10.0
2.29.25
Prefix Reserved
dotnet add package Sap.Data.Hana.Net.v10.0 --version 2.29.25
NuGet\Install-Package Sap.Data.Hana.Net.v10.0 -Version 2.29.25
<PackageReference Include="Sap.Data.Hana.Net.v10.0" Version="2.29.25" />
<PackageVersion Include="Sap.Data.Hana.Net.v10.0" Version="2.29.25" />
<PackageReference Include="Sap.Data.Hana.Net.v10.0" />
paket add Sap.Data.Hana.Net.v10.0 --version 2.29.25
#r "nuget: Sap.Data.Hana.Net.v10.0, 2.29.25"
#:package Sap.Data.Hana.Net.v10.0@2.29.25
#addin nuget:?package=Sap.Data.Hana.Net.v10.0&version=2.29.25
#tool nuget:?package=Sap.Data.Hana.Net.v10.0&version=2.29.25
SAP HANA ADO.NET Provider
Introduction
These are the SAP HANA .NET data providers for the Sap.Data.Hana and Sap.EntityFrameworkCore.Hana namespaces.
ADO.NET is the data access services component of .NET application development. It allows you to access data in relational database systems.
The ADO.NET object model is an all-purpose data access model. ADO.NET components are designed to factor data access from data manipulation. Two central components of ADO.NET do this: the DataSet and the data provider, which is a set of components including the Connection, Command, DataReader, and DataAdapter objects.
Setup
Each of the SAP HANA providers packaged in NuGet are versioned for a particular .NET version or EntityFramework version.
Create a new .NET project:
dotnet new console -n "SapHanaExample" cd SapHanaExampleChange the target framework in the
SapHanaExample.csproj, if required:<TargetFramework>net6.0</TargetFramework>Add one or more of the required SAP HANA packages to the project, based on minimum .NET version or EntityFramework version:
dotnet add package Sap.Data.Hana.Net.v6.0 dotnet add package Sap.Data.Hana.Net.v8.0 dotnet add package Sap.Data.Hana.Net.v10.0 dotnet add package Sap.EntityFrameworkCore.Hana.v6.0 dotnet add package Sap.EntityFrameworkCore.Hana.v7.0 dotnet add package Sap.EntityFrameworkCore.Hana.v8.0 dotnet add package Sap.EntityFrameworkCore.Hana.v9.0 dotnet add package Sap.EntityFrameworkCore.Hana.v10.0
Basic Usage
using Sap.Data.Hana;
using System.Runtime.InteropServices;
class Program
{
static void Main(string[] args)
{
// Only certain architectures are supported
Console.WriteLine($"Runtime Identifier: {RuntimeInformation.RuntimeIdentifier}");
Console.WriteLine($"Process Architecture: {RuntimeInformation.ProcessArchitecture}");
Console.WriteLine($"OS Architecture: {RuntimeInformation.OSArchitecture}");
Console.WriteLine($"OS Description: {RuntimeInformation.OSDescription}");
// Create a connection
string connectionString = "Server=hostname:port;UserID=username;Password=password";
try
{
using var connection = new HanaConnection(connectionString);
connection.Open();
Console.WriteLine("Connected to SAP HANA successfully!");
}
catch (Exception ex)
{
Console.WriteLine("=== EXCEPTION DETAILS ===");
Console.WriteLine($"Exception Type: {ex.GetType().FullName}");
Console.WriteLine($"Message: {ex.Message}");
Console.WriteLine($"Stack Trace:\n{ex.StackTrace}");
// Check for inner exceptions
var innerEx = ex.InnerException;
int level = 1;
while (innerEx != null)
{
Console.WriteLine($"\n=== INNER EXCEPTION {level} ===");
Console.WriteLine($"Type: {innerEx.GetType().FullName}");
Console.WriteLine($"Message: {innerEx.Message}");
Console.WriteLine($"Stack Trace:\n{innerEx.StackTrace}");
innerEx = innerEx.InnerException;
level++;
}
}
}
}
adonetHDB Native Component Details
The SAP HANA .NET Provider has a corresponding platform-specific module libadonetHDB.(so|dylib|dll) file that needs to be present with the application deployment. The supported OS and Architecture runtime files can be found packaged underneath the runtimes directory. If any of the platforms are not required for deployment, the related files can be removed.
Platform Support
The current supported platforms are:
- Linux
- Alpine x64 (
linux-musl-x64) - arm64 (
linux-arm64) - x64 (
linux-x64)
- Alpine x64 (
- macOS
- x64 (
osx-x64) - arm64 (
osx-arm64)
- x64 (
- Windows
- x64 (
win-x64) - x86 (
win-x86)
- x64 (
Documentation
Further information can be found in the SAP HANA Client Documentation
Issues
- SAP customers can file a support case underneath the
HAN-DB-CLIcomponent at https://support.sap.com/ - Community members can report or discuss issues in the SAP community forums with the SAP HANA tag
License
- The SAP HANA .NET Provider is provided underneath the SAP DEVELOPER LICENSE AGREEMENT 3.2
By using this software, you agree that the following text is incorporated into the terms of the Developer Agreement: If you are an existing SAP customer for On Premise software, your use of this current software is also covered by the terms of your software license agreement with SAP, including the Use Rights, the current version of which can be found at: https://www.sap.com/about/agreements/product-use-and-support-terms.html?tag=agreements:product-use-support-terms/on-premise-software/software-use-rights
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.