Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SqlConnectionStringBuilder and Trusted_Connection
Message
From
13/12/2009 17:28:20
 
 
To
All
General information
Forum:
ASP.NET
Category:
Databases
Title:
SqlConnectionStringBuilder and Trusted_Connection
Environment versions
Environment:
C# 2.0
Miscellaneous
Thread ID:
01438875
Message ID:
01438875
Views:
122
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
Next
Reply
Map
View

Click here to load this message in the networking platform