0

I have a form in VFP 9 that is usually called from another form with 2 parameters. I've got a strange thing happening: when I execute DO FORM jobless_add in command window, the first parameter is always set to "2", while no parameters were added.

As a result, I have EMPTY(par1) == false and EMPTY(par2) == true. After that I've tried to open the form in the normal way (from the other form's button click with 2 parameters) and I've gotten this result in debugger

This is my first visit, so I cant insert images. Link: image (hint: Locals: all ok, Watches: "2" again)

NOTE: I have no global variables yet.

kirias
  • 48
  • 5
  • try to use code tags. It makes questions easier to read. Welcome and good luck! – CosminO Feb 27 '13 at 16:00
  • Is there any chance that the currently selected table has a field called 'jobless_id'? – LAK Feb 27 '13 at 18:08
  • To clarify further, a table's field takes precedence over a memory variable if you reference just the unqualified field name. Try "m.jobless_id" to explicitly reference the variable (i.e., the parameter). – LAK Feb 27 '13 at 18:19
  • thank you, absolutely right :) It is so simple, but not so obvious for newbie) – kirias Feb 27 '13 at 18:36
  • hm, how can I close question an mark it as "solved"? – kirias Feb 27 '13 at 18:55
  • Great, glad it helped! I've reposted my response as an actual answer rather than a comment. You should select it as 'the' answer now. – LAK Feb 27 '13 at 19:51

1 Answers1

0

You most likely have a table with a field/column called 'jobless_id'.

To clarify further, a table's field takes precedence over a memory variable if you reference just the unqualified field name. Try "m.jobless_id" to explicitly reference the variable (i.e., the parameter).

LAK
  • 961
  • 7
  • 18