Subject |
Re: beginappend() Problem |
From |
Ken Mayer <dbase@nospam.goldenstag.net> |
Date |
Tue, 27 Jun 2023 14:05:31 -0700 |
Newsgroups |
dbase.getting-started |
On 6/27/2023 1:55 PM, Peter wrote:
>>
>> Okay, so as you note, it is setting the rowset state to edit. You need
>> to figure that part out. For example, I don't see anywhere that you are
>> changing the state, using beginAppend(), etc. So, where are you doing
>> that? You're not showing enough information, code, etc. Maybe if you
>> tried to reduce this down to a turnkey with as many forms and a table
>> that showed the issue as necessary ...?
>>
> Hi, Ken,
> I am not changing the rowset.state anywhere in my code. I put in a msgbox only to try to figure out why beginappend() does not put the rowset into an append mode. For my edit mode, rowset.state shows browse. For my beginappend(), rowset state shows edit. Are you advising that I code these rowset.state specifically?
I am suggesting that if you call beginAppend() it should change the
rowset's state to append. You don't show any code anywhere in your
example that sets the rowset into append mode.
If you are actually in edit mode, the rowset would show that it is in
edit mode. So if you're getting unexpected results, it is likely that
somewhere along the line you are having the default behavior in dBASE
change the mode for you. For example, if you are in edit mode and you
navigate, dBASE *automatically* saves the active row and places you in
browse mode. If instead, your code was in edit mode and you issue a call
to the save() method, then you are *automatically* placed into browse
mode. This may (note that word) be why in your code when you test for
edit mode it is showing browse instead.
Since you haven't shown the code calling these methods of the rowset,
and you're not showing *all* the code, we can't help much, we can't help
reproduce the issue, and we can't help fix the issue ...
This is all discussed in my book, implicit and explicit calls to methods
like save, etc.
Ken
--
*Ken Mayer*
Ken's dBASE Page: http://www.goldenstag.net/dbase
The dUFLP: http://www.goldenstag.net/dbase/index.htm#duflp
dBASE Books: http://www.goldenstag.net/dbase/Books/dBASEBooks.htm
dBASE Tutorial: http://www.goldenstag.net/dbase/Tutorial/00_Preface.htm
dBASE Web Tutorial: http://www.goldenstag.net/dbase/WebTutorial/00_Menu.htm
dBASE DOS to Windows Tutorial:
http://www.goldenstag.net/dbase/DtoWTutorial/00_Menu.htm
|
|