cancel
Showing results for 
Search instead for 
Did you mean: 

Setting authentication init string in ADO.NET

1,489

Hello, all

The documentation is not very clear on whether or not it is possible to set initString parameter directly in the connection string when working with ADO.NET

Something like: "server=srv;dbn=database;con=connectionName;initStr={my authentication string}"

I know it is possible to use the initString property, but if there is a problem to change a code, we might want to just change the config file.

Thank you

Accepted Solutions (0)

Answers (1)

Answers (1)

chris_keating
Product and Topic Expert
Product and Topic Expert

Here is an example:

SAConnection conn = new SAConnection("uid=dba;pwd=sql;eng=A_DB_ENG;
InitString=\\"SET TEMPORARY OPTION CONNECTION_AUTHENTICATION='{hidden}'\\"");