Okay. I have been snooping around the forums and even posting my questions about this. I got some good answers and even thought I was finished. However I ran into a snag and thought I would appeal to the power-users here who maybe can correct me.
Background: I am trying to add a field to a table that is an MD5/EncodeBase64 signature of a BLOB field. The BLOB field can be large.
Anyways, I first tried to use a loop and a recordset to evaluate and make this update for each record. (the table has a few thousand records, but will growth fast once this is implemented. But apparently Xojo has a known bug that prevents updating a recordset in a loop? Ugh.
But I was directed to doing all in the SQL statement. I had to add an EncodeBase64 function to the MySQL DB, but it seemed to work like magic.
However… I checked the data.
The hash I get from
data.Field("Signature").StringValue = EncodeBase64(Crypto.MD5(data.Field("sContents").StringValue))
is not the same as the hash I get from
"UPDATE tblmytable SET Signature = BASE64_ENCODE(MD5(sContents))
So it seems Xojo does a different MD5 and/or Base64encode from SQL?? I thought these where standards?
TIA