dbTalk Databases Forums  

Error peBOF (8705)

comp.databases.paradox comp.databases.paradox


Discuss Error peBOF (8705) in the comp.databases.paradox forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Anne Wainwright
 
Posts: n/a

Default Error peBOF (8705) - 03-11-2007 , 01:14 PM






Hi,

New form development for me.

I am using the default P9 button code for adding a new record in a child
table.

If the master record already has a detail record in the child table this
goes fine, but if the master record has no such record then the following
section of code breaks me out of inserting a new record.

;// Move to the end of the table
;//
if NOT active.end() then
message(errorCode()) ;// my line to get the 8705
errorShow() ;// custom error handling calls should go here
return
endIf

errorShow() gives the message "At beginning of table". Obviously we are
"NOT active.end()" 'ing.

The child table is represented on the form as a 1x1 MRO and the master
table as a tableframe.

What can be causing this, am I doing something wrong in principle here?

Thanks for any comments

Anne

-----
Anne Wainwright
Please reply to group

Reply With Quote
  #2  
Old   
Bertil Isberg
 
Posts: n/a

Default Re: Error peBOF (8705) - 03-11-2007 , 02:38 PM






If there is no record, you can't move to the last one.

You have to have at least one record to be able to move to it.

--
Bertil Isberg - CTECH
Paradox buglist:
online: http://hem.bredband.net/bertilisberg/

"Anne Wainwright" <duffaddress (AT) ananzi (DOT) co.za.invalid> skrev i meddelandet
news:Xns98F0D81F9A4Cazopane (AT) 196 (DOT) 43.2.61...
Quote:
Hi,

New form development for me.

I am using the default P9 button code for adding a new record in a child
table.

If the master record already has a detail record in the child table this
goes fine, but if the master record has no such record then the following
section of code breaks me out of inserting a new record.

;// Move to the end of the table
;//
if NOT active.end() then
message(errorCode()) ;// my line to get the 8705
errorShow() ;// custom error handling calls should go here
return
endIf

errorShow() gives the message "At beginning of table". Obviously we are
"NOT active.end()" 'ing.

The child table is represented on the form as a 1x1 MRO and the master
table as a tableframe.

What can be causing this, am I doing something wrong in principle here?

Thanks for any comments

Anne

-----
Anne Wainwright
Please reply to group



Reply With Quote
  #3  
Old   
Dennis Santoro
 
Posts: n/a

Default Re: Error peBOF (8705) - 03-12-2007 , 08:49 AM



Why test for end anyway? You can just insertrecord and test that (if not
insertrecord() then).

Denn Santoro
President
Resource Development Associates
http://www.RDAWorldWide.Com
Offices in the United States and Germany
Providing solutions to health care, business, governments and non-profits since
1982



Reply With Quote
  #4  
Old   
Anne Wainwright
 
Posts: n/a

Default Re: Error peBOF (8705) - 03-12-2007 , 09:25 AM



Thanks everyone.

Dennis, why not indeed! But I did say that it was the code from pdox, the
default button expert code to be precise. I don't usually use this but
wanted to be a bit more professional, "look at all the steps included
before actually inserting a new record, this must be better than my usual
one-liners". I'll simplify it to my normal standard.

Bertil & Michael, but there are records in the table, they just belong to
another master record.

the 'active' in the line

if NOT active.end() then

refers to the MRO which has a restricted view of the table, actually a
view of no records in this case, and so the code works as designed.

Michael, I like to turn autoappend off, or my temporary staff can hit the
down arrow and run to me complaining that they have now got a blank line
and where did everything go.

Anne

Dennis Santoro <RDAPres (AT) NoRDASpamWorldWide (DOT) com> wrote in
news:45F56890.1E6B2AEA (AT) NoRDASpamWorldWide (DOT) com:

Quote:
Why test for end anyway? You can just insertrecord and test that (if
not insertrecord() then).

Denn Santoro
President
Resource Development Associates
http://www.RDAWorldWide.Com
Offices in the United States and Germany
Providing solutions to health care, business, governments and
non-profits since 1982




--
-----
Anne Wainwright
Please reply to group


Reply With Quote
  #5  
Old   
Jim Moseley
 
Posts: n/a

Default Re: Error peBOF (8705) - 03-12-2007 , 01:44 PM




Anne,

Just put in a check to active.isEmpty() before doing the active.AtEnd().
If it is empty, then you are already at the last (and first) row once you
insert a row.

HTH,
Jim Moseley

Reply With Quote
  #6  
Old   
Anne Wainwright
 
Posts: n/a

Default Re: Error peBOF (8705) - 03-13-2007 , 01:36 AM



Very elegant solution there, Jim. Thanks

Anne

"Jim Moseley" <jmose (AT) mapson (DOT) attglobal.net> wrote in
news:45f5ad9d$1 (AT) pnews (DOT) thedbcommunity.com:

Quote:
Anne,

Just put in a check to active.isEmpty() before doing the
active.AtEnd().
If it is empty, then you are already at the last (and first) row once
you
insert a row.

HTH,
Jim Moseley



--
-----
Anne Wainwright
Please reply to group


Reply With Quote
  #7  
Old   
Jim Moseley
 
Posts: n/a

Default Re: Error peBOF (8705) - 03-13-2007 , 02:20 PM




Anne,

Why thank you. And yes, you can borrow some Grey Poupon!

Jim

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.