Re: Primary Key value
From: George Kuascha (gkhokie_at_hotmail.com)
Date: 02/20/05
- Next message: NZTed: "Re: ADO AV"
- Previous message: George Kuascha: "Primary Key value"
- In reply to: George Kuascha: "Primary Key value"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 20 Feb 2005 17:55:01 -0500
I found my problem. I had a missing filter.
"George Kuascha" <gkhokie@hotmail.com> wrote in message
news:4218b6bd$1@newsgroups.borland.com...
> I'm using D6 with MS Access2000. I'm copying field data from ADOTable2 to
> ADOTable1 one record at a time. After each record is copied, I need to
> capture the primary key (named ID) value in a variable (FindID). After
> posting the record to ADOTable1, the primary key value returned in my code
> is zero. I've also tried opening and closing the table between records and
> that doesn't help. Can anyone enlighted me on what I'm missing here?
>
> with ADOTable1 do
> begin
> Insert;
> FieldByName('Name1').Value:= ADOTable2.FieldValues['Name1'];
> .......
> Post;
> end;
> FindID:= ADOTable1.FieldByName('ID').AsInteger;
> showmessage(inttostr(FindID));
>
>
- Next message: NZTed: "Re: ADO AV"
- Previous message: George Kuascha: "Primary Key value"
- In reply to: George Kuascha: "Primary Key value"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]