Solved

Table2: Dataset not in Edit or Insert mode

Posted on 2001-06-04
2
1,386 Views
Last Modified: 2008-02-26
I get this error message:
Table2: Dataset not in Edit or Insert mode.

How do I work it around.

Blash

0
Comment
Question by:blash
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 22

Expert Comment

by:Mohammed Nasman
ID: 6151857
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
 
LVL 22

Accepted Solution

by:
Mohammed Nasman earned 50 total points
ID: 6151867
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

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Delphi Dbf export problem to a Visual Foxpro application 6 231
Run video youtube webbrowse 10 73
select query - oracle 16 101
delphi popmenu non latine charcters 3 30
A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question