Hi,
I have been trying to add a code to "insert" the setting/string "Trusted_Connection=true" into connection string created
with the class SqlConnectionStringBuilder but to no avail.
Here is an example of code:
SqlConnectionStringBuilder oStringBuilder = new SqlConnectionStringBuilder();
oStringBuilder.UserID = "My ID";
oStringBuilder.Password = "MyPassword";
oStringBuilder.InitialCatalog = "MyDbName";
But when I press a dot/period after oStringBuilder the intellisense does no show property for Trusted_Connection.
I read an article on MSDN that a string can be added as following:
oStringBuilder["Trusted_Connection"] = true;
But the above line does not add Trusted_Connection to the connection string. However if I add a line:
oStringBuilder["Connect Timeout"] = 20;
the value of Connect Timeout=20 is added to the connection string.
Has anybody run into this issue?
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham