I have a problem using ADO and clearing errors. I am using structure as follows:
clear(lcuConnection);
lcuConnection.SetParameters;
if not lcuConnection then
error(Text001)
else begin
RecordSet := lcuConnection.getRecordSet;
end;
In codeunit lcuConnection I am running connection object and command object to get recordset result. SetParameters is a functions which creates sql statement. The problem is if for the first time will appear error then next runs of lcuConnection will generate errors too. I am trying to clear variables but to no avail. Command and Connection Timeouts are set to 10000. If I am running by using debugger problem disappears.
Pleas help
Comments