|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 4/17/2007 5:10:00 PM
Posts: 3,
Visits: 1
|
|
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?
|
|
|
|
|
Supreme Being
      
Group: Forum Members
Last Login: 11/20/2008 6:06:39 PM
Posts: 125,
Visits: 271
|
|
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.
Shaw
|
|
|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 4/17/2007 5:10:00 PM
Posts: 3,
Visits: 1
|
|
|
Thank you Shaw! That worked perfectly.
|
|
|
|