I would like to make a effective coding of this problem
In the original code source from the internet all data are written into a GUI element, accepting strings and integer values, see <a href="http://theroadtodelphi.wordpress.com/2010/02/21/build-your-own-profiler-using-ado/" rel="nofollow">Build your own profiler using ADO
</a>.
My result.addstring does not work, wont do any type conversions to eg. default string and also use result.add(...) statement
What will be the most effective way to handle this data without much extra coding?
Code:
function ADOConnectionWillExecute( Connection: TADOConnection; var CommandText:
WideString;
var CursorType: TCursorType; var LockType: TADOLockType;
var CommandType: TCommandType; var ExecuteOptions: TExecuteOptions;
var EventStatus: TEventStatus; const Command: _Command;
const Recordset: _Recordset) : TStringlist ;
begin
result.AddStrings(
CommandText,
'Before '+GetEnumName(TypeInfo(TCommandType),Integer(CommandType)),
GetEnumName(TypeInfo(TEventStatus),Integer(EventStatus)),
GetEnumName(TypeInfo(TCursorType),Integer(CursorType)),
GetEnumName(TypeInfo(TADOLockType),Integer(LockType)), 0);
end;
In the original code source from the internet all data are written into a GUI element, accepting strings and integer values, see <a href="http://theroadtodelphi.wordpress.com/2010/02/21/build-your-own-profiler-using-ado/" rel="nofollow">Build your own profiler using ADO
</a>.
My result.addstring does not work, wont do any type conversions to eg. default string and also use result.add(...) statement
What will be the most effective way to handle this data without much extra coding?