I have a simple procedure that compares e-mails in two different databases and places an X in a field of one database if the e-mails match. Here is my code and an error message.
With ADOTable1 do
begin
While NOT EOF do
begin
Email := FieldByName('Email').AsString;
With ADOTable2 do
begin
while NOT EOF do
begin
EmailBDE := FieldByName('Email').AsString;
if Email = EmailBDE
then
edit;
ADOTable2.FieldByName('New').AsString := 'X';
post;
next;
end;
end;
next;
end;
end;
Error: ADOTable2: dataset not ib edit or insert mode.
What is my problem and what is the solution?
With ADOTable1 do
begin
While NOT EOF do
begin
Email := FieldByName('Email').AsString;
With ADOTable2 do
begin
while NOT EOF do
begin
EmailBDE := FieldByName('Email').AsString;
if Email = EmailBDE
then
edit;
ADOTable2.FieldByName('New').AsString := 'X';
post;
next;
end;
end;
next;
end;
end;
Error: ADOTable2: dataset not ib edit or insert mode.
What is my problem and what is the solution?