Soji 1 Posted March 28, 2019 (edited) Hi, We are trying to add the functionality to allow the user to change the SQL server password if it is expired. The following code snippet using TFDConnection shows what we are trying to do: FDConnection1.Params.Values['Server'] := 'SQLExpress'; FDConnection1.Params.Values['Database'] := 'TestDatabase'; FDConnection1.Params.Values['User_Name'] := 'testuser'; FDConnection1.Params.Values['Password'] := 'oldpass'; FDConnection1.Params.NewPassword := 'newpass'; FDConnection1.Open; But when we get an error while trying to change it: [FireDAC][Phys][ODBC][Microsoft][ODBC SQL Server Driver] Login failed for user 'testuser'. (Error Code is 18456) Tools we use: RAD Studio 10.2 FireDAC = 16.0.0 (Build 88974) Platform = Windows 32 bit SQL Server 2016 express edition ODBC Driver 17 for SQL server. What we observed is that if we use then it works with a patch in FireDAC units. (While debugging we found that it uses a method TFDPhysMSSQLConnection.CheckPasswordChange which uses a connection to check the SQL versions but by that time the connection was not able to make because of the password expiration. So we commented the code inside "CheckPasswordChange" and then it started to work.) But we are told to use ODBC Driver because Microsoft is not going to support Native Client in the future. Is it possible to change an expired password using FireDAC in combination with ODBC driver.? If that is possible then any advice to fix the problem mentioned above? Kind Regards, Soji Mathew. Edited March 28, 2019 by Soji Formatting went wrong after posting the question Share this post Link to post
Dmitry Arefiev 101 Posted March 28, 2019 This issue was (most probably) fixed in 10.2.2. Your workaround is almost correct. 1 Share this post Link to post
Soji 1 Posted March 28, 2019 1 hour ago, Dmitry Arefiev said: This issue was (most probably) fixed in 10.2.2 You mean FireDAC can do with ODBC driver? Share this post Link to post
Soji 1 Posted March 29, 2019 Thanks Dmitry. We will try to update to latest Delphi and see if it works. Share this post Link to post
Shermanerymn 0 Posted August 1, 2019 Because of resent problems in getting into CF I cant read my Newly remitted password so it keeps telling me Im wrong, what can I do to change my password, one that I used before this all happened?? Thanks for your help. Share this post Link to post