![]() | Products |
| Home » Technical Support » DBISAM Technical Support » Incident Reports » Incident Reports Addressed for Version 4.13 » View Incident Report |
| Reported By: David Szilagyi Reported On: 10/18/2004 For: Version 4.12 Build 1 |
Let's make a custom function MD5:
with DBISAMEngine do
with Functions.CreateFunction(ftString, 'MD5').Params do
begin
CreateFunctionParam(ftString);
end;
end;
... and write the following code to the DBISAMEngineCustomFunction procedure:
if AnsiCompareText(FunctionName, 'MD5') then
begin
if FunctionParams[0].IsNull then
Result := Null;
else
Result := AnsiLowerCase(MD5DigestToString(MD5String(FunctionParams[0].AsString)));
end;
... let's
say I have this query that works properly:
SELECT recno. floor(myfield / 1000) FROM mytable;
... and now modify it like this:
SELECT recno, floor(myfield / 1000) as F, MD5(anotherfield) as M FROM
mytable;
... and then I try this code:
ShowMessage(tMyTable.FieldByName('F').AsString);
... and it will return 0 and not the correct field value. (I think but I
am not sure that if I use a grid to display the field values, then it
works fine but if I don't have a DataSourec and a Grid then it will fail.This web page was last updated on Wednesday, April 8, 2026 at 04:38 AM | Privacy Policy © 2026 Elevate Software, Inc. All Rights Reserved Questions or comments ? |

