Guenter Becker Active Member Licensed User Longtime User May 25, 2025 #1 Hello Experts, I like to change the Database Password by B4J Code. Can anyone help me with a snipped. Thank you in advance.
Hello Experts, I like to change the Database Password by B4J Code. Can anyone help me with a snipped. Thank you in advance.
teddybear Well-Known Member Licensed User May 26, 2025 #2 What database are you using? how did you manually change the password? Upvote 0
Guenter Becker Active Member Licensed User Longtime User May 26, 2025 #3 teddybear said: What database are you using? how did you manually change the password? Click to expand... Sorry forget that info. Using SQLiCipher Version 3 or 4. Like to hava encrypted database with default apssword in my app but the user shoukd be able to set it's own password. Thiis is how I like to know how to change Cipher Password by code. Upvote 0
teddybear said: What database are you using? how did you manually change the password? Click to expand... Sorry forget that info. Using SQLiCipher Version 3 or 4. Like to hava encrypted database with default apssword in my app but the user shoukd be able to set it's own password. Thiis is how I like to know how to change Cipher Password by code.
teddybear Well-Known Member Licensed User May 26, 2025 #4 Guenter Becker said: Sorry forget that info. Using SQLiCipher Version 3 or 4. Like to hava encrypted database with default apssword in my app but the user shoukd be able to set it's own password. Thiis is how I like to know how to change Cipher Password by code. Click to expand... Try this code, it should work. B4X: Copy sql.ExecNonQuery("PRAGMA key = 'oldpasswd'") sql.ExecNonQuery("PRAGMA rekey = 'newpasswd'") Upvote 0
Guenter Becker said: Sorry forget that info. Using SQLiCipher Version 3 or 4. Like to hava encrypted database with default apssword in my app but the user shoukd be able to set it's own password. Thiis is how I like to know how to change Cipher Password by code. Click to expand... Try this code, it should work. B4X: Copy sql.ExecNonQuery("PRAGMA key = 'oldpasswd'") sql.ExecNonQuery("PRAGMA rekey = 'newpasswd'")