Board index » delphi » Error - Table not in Edit or Insert mode

Error - Table not in Edit or Insert mode

I have this perplexing problem and I'm going crazy $#@!

My app has a Datamodule where a table resides. The properties are preset
like databasename, etc and "active:=true" . When the form is opened that
accesses this datamodule, and after the table is issued the 'append' command
to enter some data, I get a runtime error that say the table is not in
insert or edit mode. I tried to add the 'edit' command before entering data
but no dice, I got the same error.

Can any one help?

--victor

 

Re:Error - Table not in Edit or Insert mode


Before insert:

try
  TABLENAME.close;
  TABLENAME.open;
  TABLENAME.edit;
except
  on E:EDBError do Showmessage('Database Error: '+E.message);
end;

Could make a procedure of it: SetToEdit or something.

Quote
Vic Feria <vfe...@worldnet.att.net> wrote in message

news:gy4k8.8938$tP2.791609@bgtnsc05-news.ops.worldnet.att.net...
Quote
> I have this perplexing problem and I'm going crazy $#@!

> My app has a Datamodule where a table resides. The properties are preset
> like databasename, etc and "active:=true" . When the form is opened that
> accesses this datamodule, and after the table is issued the 'append'
command
> to enter some data, I get a runtime error that say the table is not in
> insert or edit mode. I tried to add the 'edit' command before entering
data
> but no dice, I got the same error.

> Can any one help?

> --victor

Other Threads