cancel
Showing results for 
Search instead for 
Did you mean: 

Use SSO in connection string

Former Member
0 Kudos

Hi everyone,

I have a connection string in VBA that can successfully connect to HANA table:

StrSql = "driver=HDBODBC32;servernode=10.###.###.30:30015;DATABASE=Z_PTP_HANA_SCH;uid=xxxxx;pwd=xxxxx;"

However, I do not want to hardcode my credentials.

When the user refresh the workbook, they enter their windows authentication which logs them into HANA too through single sign on.

Is there a way to utilize that single sign on functionality into my connection string?

Accepted Solutions (0)

Answers (1)

Answers (1)

lbreddemann
Active Contributor
0 Kudos

You may easily use the hdbuserstore facility with ODBC.

See my blog post for that.

- Lars

Former Member
0 Kudos

Hi Lars, thanks for helping.

Correct me if I am wrong, but wouldnt I still have to hardcode the username in the code with this method?

lbreddemann
Active Contributor
0 Kudos

No, you would hardcode the name of the hdbuserstore entry.

The NetWeaver application server processes (workprocesses) do this, for example.

They retrieve the connection and logon information from the entry key DEFAULT.

While your application simply refers to the userstore key, you can change the actual values with every user that runs your application.