The same table in two forms in D1

The same table in two forms in D1

Post by Ireneusz Zadworn » Thu, 10 Apr 1997 04:00:00



I have the same table opened in two forms.
Is it possible to add a record in first form and edit this new record in
second form before posting it?
I use in first form TDBGrid and in second form TDBEdit componets.

I tried to add record in forst form, then post it and edit this new record
in second form using gotocurrent(form1.table1) but I got IDAPI error 8706.
I don't know what it means. I use Delphi 1.0.

Please help me.

--
Irek Z.

 
 
 

The same table in two forms in D1

Post by Rob Tanne » Thu, 10 Apr 1997 04:00:00


        Download the BDE tech doc TI3212 from Borland's website at :

        http://www.borland.com.

        This contains the BDE error codes and associated messages.
        If 8706 is in decimal the error means
        "At end of table".
--
Rob Tanner B.E.,B.Sc.
Design Engineer
WestBau Technologies, Inc.



Quote:> I have the same table opened in two forms.
> Is it possible to add a record in first form and edit this new record in
> second form before posting it?

        No.  Posting puts the record in the table.  Until you do this the second
data-aware control will not be able to read it from the table.

Quote:> I use in first form TDBGrid and in second form TDBEdit componets.

> I tried to add record in forst form, then post it and edit this new
record
> in second form using gotocurrent(form1.table1) but I got IDAPI error
8706.
> I don't know what it means. I use Delphi 1.0.

        I assume that in the second form (the TDBEdit form) you have a TTable.  If
so, call that table's Refresh method.  This will update that form's view of
the table.  Form1 has added a new record to the database that Form2 is not
yet aware of, calling gotocurrent(form1.table1) tells the form2 control(s)
to go to a record that it does not yet recognize (presumably at the end of
the underlying database table) which is why you are getting the "end of
table" error.
Quote:

> Please help me.

> --
> Irek Z.