At 12:22 2016-01-27, Sytze de Boer sytze.kiss@gmail.com wrote:
FRIENDS !! Thank you all for your comments. I appreciate it.
I decided to post/ask my query because in the past 3 months I've also had some major issues. I cannot identify the cause and I'll briefly describe it here.
I have a form with a grid. The controlsource is a free standing table. (Clients table called Windebs) The form has a command group with several buttons. Example, "Show Transactions" The click event has code such as lcclient=clcode select * from winhst where client=lcclient into curs temp
I end up with an error "variable clcode not found"
How do you manage that with no "clcode" in your code?
It is as though the underlying table is no longer Windebs, which is nuts because I did not "select" another table anywhere.
In the example above, you did a select, and the current alias will be that of the cursor. The cursor will have the structure of winhst, not windebs.
Did you open a table and forget to select 0 before doing so? I made that mistake just this morning, and my code threw an error when I tried to close the table that got opened over.
Now, I've seen similar behavior when Anti virus software is locking the tables, or extremely slow network connections, but it just started happening about 3 months ago, and only with "some" customers. At one time I thought it was only on XP pc's but that theory is also disproved.
At this stage I'm slowly trawling through my code and changing Click events to
sele windebs lcclient=clcode select * from winhst where client=lcclient in to curs temp
Due to the chaoticness of methods being fired, it can be somewhat unclear what code has just executed. I prefer to be careful and explicitly specify tables. I do not trust that the alias has stayed the same over method firing if I have any alias changing.
[snip]
Sincerely,
Gene Wirchenko