Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 9 of 9 total |
RecNo again |
Mon, Jul 28 2008 4:58 PM | Permanent Link |
"Royke" | We have an occasion where
TableRecNo := i creates a new record in Table. Definitely i >= 1, and i <= recordcount. What can be the reason for this happening? RJ |
Mon, Jul 28 2008 5:55 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | RJ,
<< We have an occasion where TableRecNo := i creates a new record in Table. Definitely i >= 1, and i <= recordcount. What can be the reason for this happening? >> There's no way that will create a new row in the table unless you've already got the table in dsInsert mode. -- Tim Young Elevate Software www.elevatesoft.com |
Mon, Jul 28 2008 8:13 PM | Permanent Link |
"Royke" | I stepped a bit deeper into the events on the table. The Recno := i triggers
an AfterScroll event, in which we change some field values. It is the Edit that creates the new record. For some reason all field values are empty (NULL, '', 0) during the call of the AfterScroll. As if we are not really yet 'after the scrolling because of the Recno change' Does this make any sense? RJ "Tim Young [Elevate Software]" <timyoung@elevatesoft.com> wrote in message news:FA0ABF1E-4012-4B59-882B-86882D90B6F2@news.elevatesoft.com... > RJ, > > << We have an occasion where > > TableRecNo := i > > creates a new record in Table. Definitely i >= 1, and i <= recordcount. > What can be the reason for this happening? >> > > There's no way that will create a new row in the table unless you've > already got the table in dsInsert mode. > > -- > Tim Young > Elevate Software > www.elevatesoft.com > |
Tue, Jul 29 2008 5:17 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | RJ,
<< I stepped a bit deeper into the events on the table. The Recno := i triggers an AfterScroll event, in which we change some field values. It is the Edit that creates the new record. For some reason all field values are empty (NULL, '', 0) during the call of the AfterScroll. As if we are not really yet 'after the scrolling because of the Recno change' Does this make any sense? >> Not particularly. Are the steps this ? 1) Attach AfterScroll event handler 2) Set RecNo 3) Examine the row values in the AfterScroll event handler ? If so, then I'll check it out and see what I can find. -- Tim Young Elevate Software www.elevatesoft.com |
Thu, Jul 31 2008 11:30 AM | Permanent Link |
"Royke" | That's it. The values are correct if we use a Locate on some field, instead
of setting the RecNo. RJ "Tim Young [Elevate Software]" <timyoung@elevatesoft.com> wrote in message news:2936837B-9408-4308-BEA9-B2CDDC3890BE@news.elevatesoft.com... > RJ, > > << I stepped a bit deeper into the events on the table. The Recno := i > triggers an AfterScroll event, in which we change some field values. It is > the Edit that creates the new record. For some reason all field values are > empty (NULL, '', 0) during the call of the AfterScroll. As if we are not > really yet 'after the scrolling because of the Recno change' Does this > make any sense? >> > > Not particularly. Are the steps this ? > > 1) Attach AfterScroll event handler > 2) Set RecNo > 3) Examine the row values in the AfterScroll event handler ? > > If so, then I'll check it out and see what I can find. > > -- > Tim Young > Elevate Software > www.elevatesoft.com > |
Sat, Aug 2 2008 9:24 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | RJ,
<< That's it. The values are correct if we use a Locate on some field, instead of setting the RecNo. >> I'm not seeing this here. Setting the RecNo and putting a ShowMessage() in the AfterScroll results in the proper values being shown: procedure TForm1.Button4Click(Sender: TObject); begin EDBTable1.RecNo:=10; end; procedure TForm1.EDBTable1AfterScroll(DataSet: TDataSet); begin ShowMessage(EDBTable1.FieldByName('CustNo').AsString); end; -- Tim Young Elevate Software www.elevatesoft.com |
Sun, Aug 3 2008 2:24 AM | Permanent Link |
"Royke" | We just stumbled into the same thing again, in a different context. I also
put a ShowMessage (actually CodeSite Send) in the AfterScroll, and got normal field values after some normal scrolling, then empty values after setting a Recno. Any chance that it happens only inside a Disable/EnableControls pair? That is what we had. The table involved is a detail table. RJ "Tim Young [Elevate Software]" <timyoung@elevatesoft.com> wrote in message news:31430A58-9094-4673-89B6-F88387E69460@news.elevatesoft.com... > RJ, > > << That's it. The values are correct if we use a Locate on some field, > instead of setting the RecNo. >> > > I'm not seeing this here. Setting the RecNo and putting a ShowMessage() > in the AfterScroll results in the proper values being shown: > > procedure TForm1.Button4Click(Sender: TObject); > begin > EDBTable1.RecNo:=10; > end; > > procedure TForm1.EDBTable1AfterScroll(DataSet: TDataSet); > begin > ShowMessage(EDBTable1.FieldByName('CustNo').AsString); > end; > > -- > Tim Young > Elevate Software > www.elevatesoft.com > |
Sun, Aug 3 2008 4:30 PM | Permanent Link |
"Royke" | I can confirm that this is an issue related tro Master-Detail. On the first
master record, things work ok, but on subsequent records setting RecNo works erraticly (at least here). I have a second master record with five detail records. If I set RecNo of the detail to 1, I am one some blank record. Setting RecNo to 2 or 3 gives me the first record. Going to 4 gives me 2, and going to 5 gives me 3. RJ "Royke" <royke@canada.com> wrote in message news:4492A4C8-3204-42E6-A7D4-94E171F73648@news.elevatesoft.com... > We just stumbled into the same thing again, in a different context. I also > put a ShowMessage (actually CodeSite Send) in the AfterScroll, and got > normal field values after some normal scrolling, then empty values after > setting a Recno. > > Any chance that it happens only inside a Disable/EnableControls pair? That > is what we had. The table involved is a detail table. > > RJ > > "Tim Young [Elevate Software]" <timyoung@elevatesoft.com> wrote in message > news:31430A58-9094-4673-89B6-F88387E69460@news.elevatesoft.com... >> RJ, >> >> << That's it. The values are correct if we use a Locate on some field, >> instead of setting the RecNo. >> >> >> I'm not seeing this here. Setting the RecNo and putting a ShowMessage() >> in the AfterScroll results in the proper values being shown: >> >> procedure TForm1.Button4Click(Sender: TObject); >> begin >> EDBTable1.RecNo:=10; >> end; >> >> procedure TForm1.EDBTable1AfterScroll(DataSet: TDataSet); >> begin >> ShowMessage(EDBTable1.FieldByName('CustNo').AsString); >> end; >> >> -- >> Tim Young >> Elevate Software >> www.elevatesoft.com >> > > |
Mon, Aug 4 2008 5:56 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | RJ,
<< I can confirm that this is an issue related tro Master-Detail. On the first master record, things work ok, but on subsequent records setting RecNo works erraticly (at least here). I have a second master record with five detail records. If I set RecNo of the detail to 1, I am one some blank record. Setting RecNo to 2 or 3 gives me the first record. Going to 4 gives me 2, and going to 5 gives me 3. >> Setting the RecNo property does not take into account active ranges like DBISAM did. There is no such thing as a logical record number in EDB - that was entirely a DBISAM feature. -- Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Thursday, September 26, 2024 at 10:04 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |