cancel
Showing results for 
Search instead for 
Did you mean: 

B1 SAP Hana error: database 'SBODEMOGB' does not exist

Former Member
0 Kudos

Hello experts,

I am trying to perform queries on a SAP Hana database on SAP Business One.

I have the following code:

// Establish an active connection to the SAP HANA database  
HanaConnection conn = new HanaConnection("Server=192.*.*.*:30015;
databaseName=SBODEMOGB;UserID=SYSTEM;Password=blablabla");  

//Open the database connection   
conn.Open();

The error gets thrown on conn.Open(); The error is as below:

Sap.Data.Hana.HanaException was unhandled by user code
ErrorCode=-2147467259
HResult=-2147467259
Message=general error: database 'SBODEMOGB' does not exist
NativeError=2
Source=SAP HANA Data Provider for Microsoft ADO.NET

What could be wrong?

Any help appreciated.

Kinyanjui

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Got the solution.

Just get rid on databaseName in the connection string and it works.

Answers (1)

Answers (1)

0 Kudos

If you want to pass Database name as well in the connection string use currentSchema=DbName.

Something like below:

// Establish an active connectionto the SAP HANA database  
HanaConnection conn =new HanaConnection("Server=192.*.*.*:30015;
currentSchema=SBODEMOGB;UserID=SYSTEM;Password=blablabla");  //Open the databaseconnection   
conn.Open();

Regards,

Aditya