Grids can seemingly change the current work area or current record in unexpected places, depending on where your code is. If your code is dependent on certain tables being current, you may be better served by always specifying the table when referencing the field (table.field).
Fred
On Wed, Jan 27, 2016 at 1:22 PM, 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"
It is as though the underlying table is no longer Windebs, which is nuts because I did not "select" another table anywhere. 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
On Thu, Jan 28, 2016 at 7:22 AM, Gene Wirchenko genew@telus.net wrote:
At 08:54 2016-01-27, Alan Bourke alanpbourke@fastmail.fm wrote: Someone (attributio lost) wrote:
I still use Hungarian notation too, despite Microsoft telling us years ago that it's no longer acceptable style. Then again, we Foxers have always been rebels. lol
For strongly-typed languages in modern development tools why would you use it?
Because it is much shorter. Suppose I have an array of client data.I might use: sClient size of clients array cClient how many clients xClient index into array
Makes sense for VFP probably.
I have never used it much in VFP. I do not have the name collisionI
do in other languages.
Sincerely,
Gene Wirchenko
[excessive quoting removed by server]