Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 10 of 17 total
Thread table not in edit or insert mode
Mon, Oct 15 2007 10:50 AMPermanent Link

Paul Waegemans
See error hereby.

Starting the application I each time do a repair table with forceindexrebuild on this particular table.

What is the problem???

Paul.
Mon, Oct 15 2007 10:52 AMPermanent Link

Paul Waegemans
Paul Waegemans <paul.waegemans@imseuro.be> wrote:

See error hereby.

Starting the application I each time do a repair table with forceindexrebuild on this particular table.

What is the problem???

Paul.
Hereby the errormessage...



Attachments: problem_edit_or_append_record.jpg
Mon, Oct 15 2007 12:07 PMPermanent Link

Eryk Bottomley
Paul


> Starting the application I each time do a repair table with forceindexrebuild on this particular table.
>
> What is the problem???


The usual cause of errors like that is a BeforeEdit/BeforeInsert event
handler triggering something like a FindKey against another table that
is not yet active. I don't see what RepairTable has to do with this
though ...from what I can see of the code snippet you are just
attempting to Append/Edit a record.

Eryk
Mon, Oct 15 2007 1:21 PMPermanent Link

Paul Waegemans
Eryk Bottomley <no@way.com> wrote:

Paul


> Starting the application I each time do a repair table with forceindexrebuild on this particular table.
>
> What is the problem???


The usual cause of errors like that is a BeforeEdit/BeforeInsert event
handler triggering something like a FindKey against another table that
is not yet active. I don't see what RepairTable has to do with this
though ...from what I can see of the code snippet you are just
attempting to Append/Edit a record.

Eryk

I do the repair when I start the application to be sure that all my indexes are OK.

Could the reason be that there is one lookupfield in the table.  I never had the problem before...  I did not change the code...

The problem appears only in a tbla from a customer.  In my own database I have no problems...  Weard.

Paul.
Mon, Oct 15 2007 5:33 PMPermanent Link

Eryk Bottomley
Paul

> Could the reason be that there is one lookupfield in the table.  I never had the problem before...  I did not change the code...

No, a fkLookup field shouldn't cause a problem like that of itself. The
associated OnCalcFields event handler could though (if there is one
assigned).

> The problem appears only in a tbla from a customer.  In my own database I have no problems...  Weard.

I can't explain that from the information available. My best guess is
that a Dataset.Open is failing at some point and the application
exception handling is masking the error and allowing the app to continue
to run until it trips up at this failure point.

Eryk
Wed, Oct 17 2007 6:15 AMPermanent Link

Paul Waegemans
> The problem appears only in a tbla from a customer.  In my own database I have no problems...  Weard.

I can't explain that from the information available. My best guess is
that a Dataset.Open is failing at some point and the application
exception handling is masking the error and allowing the app to continue
to run until it trips up at this failure point.

Eryk

With the same programcode have have no problem with my table "Leden". The record appends correctly. With the table leden of a customer the
problem appears....
Thats why I tried the repair table + forceindexrebuild so that I'am sure that the table and indexes are correct.

The most weard is that if I filter the table with the following code

with DmL.tblLeden do
    begin
    filter:='Geboortedatum='+quotedstr(Ansidatetostr(StrToDate(mskgeboorte.text)));
    filtered:=true;
    end;

(this filter can be placed to show all the records of the memebers with the same date of birth)

the append record works correctly.

There is no ONFILTERRECORD event.

Paul
Thu, Oct 18 2007 1:57 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Paul,

<< With the same programcode have have no problem with my table "Leden". The
record appends correctly. With
the table leden of a customer the problem appears....
Thats why I tried the repair table + forceindexrebuild so that I'am sure
that the table and indexes are correct. >>

Could you possibly send me the code that you're having trouble with ?  I can
take a look and get you an answer a lot quicker that way.

Thanks,

--
Tim Young
Elevate Software
www.elevatesoft.com

Fri, Oct 19 2007 9:43 AMPermanent Link

Paul Waegemans
"Tim Young [Elevate Software]" <timyoung@elevatesoft.com> wrote:

Could you possibly send me the code that you're having trouble with ?  I can
take a look and get you an answer a lot quicker that way.

Tim,

The screenshot from the code is in attachment from the 2nd message

Paul.
Fri, Oct 19 2007 2:35 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Paul,

<< The screenshot from the code is in attachment from the 2nd message >>

I meant the actual code, not a screen shot.

--
Tim Young
Elevate Software
www.elevatesoft.com

Sat, Oct 20 2007 6:51 AMPermanent Link

Paul Waegemans
"Tim Young [Elevate Software]" <timyoung@elevatesoft.com> wrote:

Paul,

<< The screenshot from the code is in attachment from the 2nd message >>

I meant the actual code, not a screen shot.

--
Tim Young
Elevate Software
www.elevatesoft.com

with DmL.TblLeden do
    begin
    if overname=true then edit else Append;
    fieldbyname('Naam').asstring:=EdtNaam.text+' '+Edtvoornaam.text;
    fieldbyname('Straat').asstring:=Edtadres.text+' '+EdtHuisnummer.text;
    fieldbyname('Postcode').asstring:=EdtPostcode.text;
    fieldbyname('plaats').asstring:=EdtPlaats.text;
    fieldbyname('geboortedatum').asdatetime:=strtodate(mskgeboorte.text);
    fieldbyname('actief').asstring:='A';
    fieldbyname('A_S').asboolean:=true;    //// default actieve speler
    if (bondslid.ItemIndex=0) then
       begin
       fieldbyname('aansluitdatum').asdatetime:=date;
       fieldbyname('status').asstring:='';
       end;
    if (overname=true) and (bondslid.ItemIndex=1) then fieldbyname('aansluitdatum').clear;
    positie:=Getbookmark;
    post;
    gotobookmark(positie);
    freebookmark(positie);
    end;

Page 1 of 2Next Page »
Jump to Page:  1 2
Image