Board index » delphi » Two tables in EDIT/INSERT mode???

Two tables in EDIT/INSERT mode???

Help!!

I have a form deal with two tables.  When I tried to INSERT a blank record to these tables.  Yes, I can make any data entry for these tables.  However, when I
tried to post the entry to these tables, I got the error message which say one
of my table are not in EDIT mode and not allowed me to make any updating.  Thereis my code:

        table1.insert;
        table2.insert;
           ......
           ......
        table1.post;
        table2.post;
Can anyone gives me some help ?!?  Thanks in advance.

 

Re:Two tables in EDIT/INSERT mode???


In <47t6n0...@news.asiaonline.net> soph...@asiaonline.net (Sophia Wong)
writes:
Quote

>Help!!

>I have a form deal with two tables.  When I tried to INSERT a blank

record to these tables.  Yes, I can make any data entry for these
tables.  However, when I
Quote
>tried to post the entry to these tables, I got the error message which
say one
>of my table are not in EDIT mode and not allowed me to make any

updating.  Thereis my code:

Quote

>    table1.insert;
>    table2.insert;
>       ......
>       ......
>    table1.post;
>    table2.post;
>Can anyone gives me some help ?!?  Thanks in advance.

Any FindKey code in between ?
Ben
Arrow

Re:Two tables in EDIT/INSERT mode???


Quote
arr...@ix.netcom.com (Arrow ) wrote:
>In <47t6n0...@news.asiaonline.net> soph...@asiaonline.net (Sophia Wong)
>writes:

>>Help!!

>>I have a form deal with two tables.  When I tried to INSERT a blank
>record to these tables.  Yes, I can make any data entry for these
>tables.  However, when I
>>tried to post the entry to these tables, I got the error message which
>say one
>>of my table are not in EDIT mode and not allowed me to make any
>updating.  Thereis my code:

>>        table1.insert;
>>        table2.insert;
>>           ......
>>           ......
>>        table1.post;
>>        table2.post;
>>Can anyone gives me some help ?!?  Thanks in advance.

>Any FindKey code in between ?
>Ben
>Arrow

My experience with Delphi has been that every time you breath the
tables are forced back into browse mode.  Before you do your post try

Table1.Edit;
Table2.Edit;

This should force them back into edit mode.  Hope this helps!

Re:Two tables in EDIT/INSERT mode???


Quote
Sophia Wong (soph...@asiaonline.net) wrote:

: I have a form deal with two tables.  When I tried to INSERT a blank record to these tables.  Yes, I can make any data entry for these tables.  However, when I
: tried to post the entry to these tables, I got the error message which say one
: of my table are not in EDIT mode and not allowed me to make any updating.  Thereis my code:

:       table1.insert;
:       table2.insert;
:          ......
:          ......
:       table1.post;
:       table2.post;

Try table2.post first, what is probably happening is the table1.post is causing table2 to be automatically posted.  Use the de{*word*81} and watch the state of the table as you step through the .post to verify this.

Hope this helps,
Sco

Other Threads