Table2: Dataset not in Edit or Insert mode

I get this error message:
Table2: Dataset not in Edit or Insert mode.

How do I work it around.

Blash

blashAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Mohammed NasmanConnect With a Mentor Software DeveloperCommented:
Hello again

   for better way to get rid of this problem, always check about the table state before you call post method

  if Table2.State in [dsInsert,dsEdit] then
    Table2.Post;

Mohammed Nasman
0
 
Mohammed NasmanSoftware DeveloperCommented:
Hello

  That's you are trying to call post method for the table, but u didn't add new record or modify record
you need to call append or edit befor post

 Table2.Edit;
 Table2['CustNo'] := 99;
 Table2.Post;

  but if you didn't call edit, it will give you the error message that u wrote

Best regards
Mohammed Nasman
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.