All Forums Connectivity
Anomaly 3 posts Joined 07/06
14 Jul 2006
.NET Provider TdConnectionStringBuilder help

I am having problems getting the TdConnectionStringBuilder in the .NET Data Provider to work.Here is my code that does not work:TdConnectionStringBuilder stringBuilder = new TdConnectionStringBuilder(); stringBuilder.AccountString = accountString;stringBuilder.DataSource = connect.DataSource;stringBuilder.Database = connect.Database;stringBuilder.UserId = username;stringBuilder.Password = password;connect.ConnectionString = stringBuilder.ConnectionString;connect.Open();The reason that it does not work is because it loses the password. The reason I know this is because I can use this line and it will work:connect.ConnectionString = stringBuilder.ConnectionString + ";Password=" + password;connect.Open();Has anyone had this problem using the .NET Data Provider? Could this be a bug or is it something that I am missing?

NetFx 346 posts Joined 09/06
14 Sep 2006

Please set TdConnectionStringBuilder.PersistSecurityInfo property to true.Release 1 required this property to be set to true before it would persist the password to the Connection String. This requirement is removed in Release 2.

Anomaly 3 posts Joined 07/06
25 Sep 2006

Thank you Shaw! That worked perfectly.

You must sign in to leave a comment.