cancel
Showing results for 
Search instead for 
Did you mean: 

Connection with c#

ramco1917
Participant
0 Kudos

Hi

How to create a connection to Sap Database using Web.Config in c#

Thanks

Accepted Solutions (0)

Answers (1)

Answers (1)

PierreBrothier
Contributor
0 Kudos

Hi,

if you want to make some queries directly to the database,

you'll need to setup the connexion string.

With Hana Db, you can use the HanaConnection

HanaConnection l_hConn = new HanaConnection() { ConnectionString = "Server = <hanaServer>:30015; UserName = USER; Password = PASSWORD" };

l_hConn.Open();

You can store your connection string in you config file.

You can also query B1 object through service Layer or DI API SDK.

Hope it helps.