Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
EOF()
Message
From
21/11/2001 12:25:01
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Title:
Re: EOF()
Miscellaneous
Thread ID:
00584508
Message ID:
00584570
Views:
30
>I have a form that is behaving strangely. I am using a dataenvironment, buffer mode 3, setting an index and have this in the dataenvironment init method:
>
>sele depot (name of main table and initially selected alias)
>go bott
>
>When the form appears, all the fields are greyed out and the record pointer is at eof(). The form works other than that, but when I use a previous (skip -1) to move off this record, the code below gives me additional problems.
>
>I have used an piece of code to check the status of the record buffer before moving to a new record for years and never had a problem. I use optimistic row buffering for tables and this routine: (abbreviated)
>
>lstatus = getfldstate(-1)
>
>This should return a numeric with one digit for each field. I then look at this to see if any fields are not ones.
>
>Lstatus is coming back as a null. Is this because I was at EOF()?
>
>Where might I look to see how I am getting to eof() rather than bottom?
>
>VFP 5.0a
Potter,
If you use -1 then return value is a character string.
NULL returns if you're at eof(). You could use nvl() there :
nvl(getfldstate(-1),replicate("1",fcount()+1)).

There are a lot of things that might put you at eof.
But first I would check for a relation. And if there is a relaition an orphaned child key might be the reason.
Set deleted on and all recs deleted, set key, set filter etc.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform