S sigster Active Member Licensed User Longtime User Apr 6, 2015 #1 Hi I was using this sample to DecodeBase64 how can I EncodeBase64 to textbox this is how I read from database but know I need to save to database in EncodeBase64 Code: Copy mobile = RS.GetString("mobile") Dim b() As Byte = su.DecodeBase64(mobile) Decode_gsm = BytesToString(b, 0, b.Length, "UTF-8") regards Sigster https://www.b4x.com/android/forum/threads/bug-cant-decodebase64.9316/#post-254633
Hi I was using this sample to DecodeBase64 how can I EncodeBase64 to textbox this is how I read from database but know I need to save to database in EncodeBase64 Code: Copy mobile = RS.GetString("mobile") Dim b() As Byte = su.DecodeBase64(mobile) Decode_gsm = BytesToString(b, 0, b.Length, "UTF-8") regards Sigster https://www.b4x.com/android/forum/threads/bug-cant-decodebase64.9316/#post-254633
imbault Well-Known Member Licensed User Longtime User Apr 6, 2015 #2 Hi, It's better to save to your database in BLOB, binary, than encoded in base64, cause it will be about 4x bigger. Base64 is used for transfering usually, internally, binary is better else is: Code: Copy Dim Encoded64 as String Dim Conv As ByteConverter Encoded64 = su.EncodeBase64(Conv.StringToBytes(Decode_gsm,"UTF-8")) ' Save the Encoded64 into your database field Last edited: Apr 6, 2015 Upvote 0
Hi, It's better to save to your database in BLOB, binary, than encoded in base64, cause it will be about 4x bigger. Base64 is used for transfering usually, internally, binary is better else is: Code: Copy Dim Encoded64 as String Dim Conv As ByteConverter Encoded64 = su.EncodeBase64(Conv.StringToBytes(Decode_gsm,"UTF-8")) ' Save the Encoded64 into your database field
S sigster Active Member Licensed User Longtime User Apr 6, 2015 #3 will check it out with BLOB, binary but this is only few name in the database around 30 name Thanks for the help Regards Sigster Upvote 0
will check it out with BLOB, binary but this is only few name in the database around 30 name Thanks for the help Regards Sigster