The connection process now is executed in a Unicode session character set, enabling connection to any user or database supported by the Advanced SQL Engine. The .NET Data provider supports logon information as Unicode strings. During the connection process, the Data Provider submits the TdConnection.ChangeDatabase command also in a Unicode session.
The ChangeDatabase command may also be executed independently of the logon process and submits the command in a Unicode session.
As an example, the code below is executed in a LATIN1250 session character set, which cannot represent Unicode escape sequence of U+3029. By supplying the user name, password and database strings in Unicode, the Data Provider supports connection to the SQL Engine using an expanded set of Unicode characters.
C# |
Copy Code |
---|---|
TdConnectionStringBuilder blr = new TdConnectionStringBuilder(); blr.DataSource = "teradb01"; // The user id contains a Unicode escape sequence // representing a CJK character blr.UserId = "User\u3029"; blr.Password = "MyPassword"; blr.SessionCharacterSet = "LATIN1250_1A0"; TdConnection con = new TdConnection(blr.ToString()); con.Open(); |
Expired passwords are also executed in a Unicode session, when providing the TdConnectionStringBuilder.NewPassword property. As the connection is established, and an expired password is detected, the supplied NewPassword Unicode string is used to modify the password. When a password is expired, the only command permitted to the Advanced SQL Engine is a modify user command to modify the password.