Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why is append blank adding two records?
Message
From
31/10/1997 23:20:11
 
 
To
31/10/1997 21:04:27
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00057230
Message ID:
00057749
Views:
33
>>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.
"You don't manage people. You manage things - people you lead" Adm. Grace Hopper
Pflugerville, between a Rock and a Weird Place
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform