![]() | Products |
| Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
| Messages 1 to 3 of 3 total |
| Tue, Jan 20 2015 1:37 AM | Permanent Link |
Creatorre | Hello.
How to get autoincrement key field value after table Post? tblOrderItems.Append; tblOrderItemsProductID.AsInteger := 5; tblOrderItems.Post; KeyId := tblOrderItemsID.AsInteger; But tblOrderItemsID=0. How can I solve this issue? Thanks. |
| Tue, Jan 20 2015 3:49 AM | Permanent Link |
Roy Lambert NLH Associates | Creatorre
>How to get autoincrement key field value after table Post? > >tblOrderItems.Append; >tblOrderItemsProductID.AsInteger := 5; >tblOrderItems.Post; > >KeyId := tblOrderItemsID.AsInteger; > >But tblOrderItemsID=0. How can I solve this issue? It should just be there. Try tblOrderItems.Refresh before you check it. Roy Lambert |
| Tue, Jan 20 2015 9:04 AM | Permanent Link |
Raul | On 1/20/2015 1:37 AM, Creatorre wrote:
> How to get autoincrement key field value after table Post? > tblOrderItems.Append; > tblOrderItemsProductID.AsInteger := 5; > tblOrderItems.Post; > > KeyId := tblOrderItemsID.AsInteger; > > But tblOrderItemsID=0. How can I solve this issue? What exactly are tblOrderItems, tblOrderItemsProductID and tblOrderItemsID ? I normally us the fieldbyname for field access and following works fine here: DBISAMTable1.Append; DBISAMTable1.FieldByName('num1').AsInteger := 111; DBISAMTable1.Post; KeyID := DBISAMTable1.FieldByName('AInc').AsInteger; KeyID contains the expected new autoinc value. Raul |
This web page was last updated on Saturday, October 3, 2026 at 04:08 PM | Privacy Policy © 2026 Elevate Software, Inc. All Rights Reserved Questions or comments ? |

