What does this mean and how can I fix it? This is a standard procedure I’ve run hundreds of times every year for several years. Today, it gave me this error message.
You haven’t given us much to go on. With the limited information available, I’m guessing your database used to have a field name I, but you renamed or deleted it.
What Jim is too polite to say is that it can be hard enough to debug a database with the datasheet and all the procedures and forms available to be examined, but it’s impossible with no information at all. This is probably the simplest and most self-explanatory error message that Panorama X offers, but without quoting the code of the procedure in which it occurs, at the very least, no-one is going to be able to offer much of a guess as to why it no longer works.
Also you also haven’t said which version of Panorama you are running. That seems unlikely to be relevant here, but you never know.
Might be that at that point of that run of that procedure it thought the active database was different than the one you expected, the one in which they existed just fine. Happens to me in unpredictable sites, within old multiple database procedures, more often than I wish. Sometimes the next run works fine without changes. Other times inserting a setactivedstabase
statement before the error, setting it to the db I’d expected, fixes that site.
Why it happens that time I don’t know. I presume it reflects poor coding skills when I wrote it years ago, some of it rewritten Pan6 code in early PanX years, some of it unaltered Pan6 code. I continue to learn. I know 20+ years ago I routinely wrote Window statement intending to change both the active window and active database. Now that doesn’t seem to always accomplish both. Perhaps some statements change one or the other in ways I don’t anticipate. Perhaps as PanX grew it’s become pickier, or perhaps computer actions outside of PanX caused something to change.
I found it eventually. My error, I guess, having moved a procedure to a note in a field settings. But I missed the “l” in “lookup”. The problem, though, is that the error message was totally universal. It didn’t say there was an error in the XXX procedure or the YYY field. Hence, I was left to flounder for a few days until I stumbled on it by accident.
POINT BEING that more focused and informative error messages would be a real boon.
The error text says exactly the opposite: Your note (with the missing “l” from “lookup”) is not the cause of this error — the letter “l” that you left in a procedure where you copied your snippet from is the cause.
Are you serious? You started off this thread with a completely uninformative question, implying that this error message just popped up out of the blue when it actually occurred after you made a change in the code. In the process, you wasted the time of several people on this forum.
You made a change in the code, so Panorama doesn’t need to tell you where that code is. Panorama doesn’t tell you what code contains the error because it should be obvious to you. It sounds like you made a change to the code and then didn’t ever test it - to the point that you didn’t even remember you had made the change. Sorry, but Panorama (or any programming system) cannot save you from atrocious programming habits.
If the error occurs in a named procedure, Panorama will open that procedure and try to pinpoint the spot where the procedure occurred. But that’s not possible for anonymous procedures that don’t have their own windows. It’s also not necessary - if an error occurs when you modify YYY field, well then of course you should look at the code for YYY field.
I guess I ran out of polite.
Hear, hear!
This forum has many used, but getting other people to do your debugging isn’t one of them. No-one but you is better placed to debug your own code, if nothing else because only you can compare what you know you meant to write with what you find you have actually written.