I have a function that hashs the value that a user entered in a text
box and stored that hash value as a password. All is well unless a
user enters a password that when hased has a ; in it.
If a user entered 33333333 as the password my hash function returns a
value that includes a ; and then the DoCmd.RunSQl fails.
Is there a good way of fixing this? Since it is a hash of the password
I was thinking of maybe just running a function that replaces the ;
with another character before saving the value into the database.
my question is what would be the best way to do this? Also are there
any characters that I need to worry about?
txtUSERPWD_NEW_HASH = HashString(txtUSERPWD_NEW)
DoCmd.SetWarnings False
DoCmd.RunSQL "UPDATE T_USER SET T_USER.USERPWD='" & txtUSERPWD_NEW_HASH
& "' WHERE T_USER.USERID='" & txtUSERID & "' ;"
DoCmd.SetWarnings True