Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why is append blank adding two records?
Message
From
01/11/1997 00:02:39
 
 
To
31/10/1997 23:20:11
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00057230
Message ID:
00057760
Views:
35
>>>It sounds like you are getting bit by the 'phantom' record. I had the same problem when I started in VFP trying to get this whole 'buffering' thing straight. What I do when I need to add a new record is insert with certain fields that I KNOW will always be there. In one system I set my last transaction date, last user update, and am given the new vendor id number. THAT'S what I use to create the new record.
>>>
>>>Trust me, get AWAY from append blank in a buffered file.
>>
>>Hi Dorris, and thanks for the advice.. Could you give me a code example
>>of what you are talking about? Also, when I APPEND BLANK, the record pointer
>>is moving to the last record instead of appending a blank record to the
>>end of the table.. :)))
>
> i KNEW I was going to regret this.....Robert, I'm not wanting to be harsh, but how simple DOES the answer have to be?
>
>....if new record
>m.lastupdate = datetime()
>m.userupdt = muserid
>m.vendid = thisform.r_vendid
>insert into vendmast from memvar
>
>This way, I KNOW the record pointer is where I need it to be, I don't have a problem with odd blank records cropping up and the Cancel button on the form can simply do a table revert.
thanks Dorris, I have done a lot of work for the Texas Department of Health
in foxpro. I am trying to get away from m.fld... I would think in vfp50
and with buffering you would never have a need for m.fld. But, to be sure
and to get my work load done on time, I should and probably will take your good
advice. I really appreciate you taking the time to take out the blocks for me. I think the older I get, the more I miss the obvious...
thanks again... :)))))
Robert Keith
Independent Developer
San Antonio, Texas
E-mail address:
rebelrob1@yahoo.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform