But it looks like the Script is not executed. And i tried also this in Lazarus:
function TDM.Base64GUID(args: array of variant): variant;
var
NewGuid:TGuid;
Encoder:IdCoderMIME.TIdEncoderMIME;
Bytes: TBytes;
begin
try
CreateGUID(NewGuid);
Encoder:=TIdEnCoderMIME.Create;
Bytes:=TEncoding.ASCII.GetBytes(GuidToString(NewGuid));
result := Encoder.EncodeBytes(Bytes);
finally
Encoder.Free;
end;
end;
Here i have the Error: Identifier not found “TEncoding”
procedure TDM_member.tbl_memberAfterInsert(DataTable: TDADataTable);
begin
if (tbl_member_CanInsert) then
begin
with tbl_member do
begin
//FieldByName('ID').AsString:=CreateClassID; // Generate GUID
FieldByName('ID').AsString:=NewGuid(); // Generate GUID
FieldByName('C_NO').AsString:=camp_no;
FieldByName('U_NO').AsInteger:=gideon_no;
FieldByName('CERT_G').AsString:='False';
FieldByName('CERT_A').AsString:='False';
FieldByName('LTM_G').AsString:='False';
FieldByName('LTM_A').AsString:='False';
FieldByName('CS_S_T').AsString:='False';
FieldByName('L_UPDATE').AsDateTime := Now;
FieldByName('STAT_DEL').AsString:=('0');
Post;
end;
end;
end;
Is there a way to do this completely on the Server?