in clarion 11.1 getting message GPF with message ‘you have not called usefile’ for files that are not used in the procedure
Hi Harry,
Not a lot to go on from the description alone, but a few things worth checking. First, that’s a hardcoded ASSERT in ABFILE.CLW, not a real GPF — Debug-mode only:
ASSERT(FALSE,'You have not called UseFile() for ' & NAME(SELF.File))
It fires when a LazyOpen file gets touched without UseFile() being called first, which is normally handled automatically — ViewManager.UseView() calls it for every file in a managed view, including JOINed ones. So a file that looks “unused” in the procedure is usually being pulled in some other way. A few candidates:
- A VIEW behind a browse or report — a JOIN for a lookup/description column. If it’s set up properly through the templates this should be handled for you, so if this is it, something about how the relation/JOIN was added is likely off.
- RelationManager cascade chains — parent/child relate on insert/update/delete, if that chain wasn’t fully opened.
- Global extensions — security checks, audit logging, licensing — anything touching a file on every procedure regardless of what that procedure itself uses. If it happens across multiple procedures rather than just one, this is probably it.
- Helper functions with raw file access — a shared lookup/description function that does a GET() or fetch directly rather than through Access:File, called from a list or report Format expression.
- FileDropCombo / dropdown lookups on a form — if the dropdown’s driving file isn’t properly initialized before it populates.
Same underlying cause each time: something’s reaching the file below the Access:/Relate: layer. The ASSERT message names the exact file, so that’s the place to start tracing from.