Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Memory Variable problem
Message
From
20/03/2002 07:01:36
 
 
To
20/03/2002 06:19:35
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00634629
Message ID:
00634859
Views:
19
Hi Hilmar,

Thanks a lot for helping. Actually i am not familir with tableupdate() and table revert()...
I am using simple insert command to updating table from memory variable. Some cases one memory variable being written in more than 2 table.
Better suggestion highly apreciated.

Best regards,
Sajjad


>I don't know how well you know form properties, so I will briefly explain here.
>
>A variable declared in a method (with LOCAL) is only visible within this method. As soon as the method finishes running, the variable dissapears.
>
>A form property is available in all methods of the form. However, unlike a global (public) variable, it is only defined for the form.
>
>To create form properties, give the menu command Form | New Property. Let's assume you create a property called MyProperty.
>
>To access or change the property, use ThisForm.MyProperty within the form.
>
>To access from a menu or toolbar, use _vfp.ActiveForm.MyProperty (to access properties of the form that is currently on top).
>
>All of the above applies almost identically to Class properties.
>
>
>OTOH, I am suspecting that what you are trying to do is save data to variables before saving to disk. It is simpler to set the ControlSource of a TextBox directly to the field on disk. Enable buffering on the table or view; use TableUpdate() to save changes, and TableRevert() to un-do changes.
>
>HTH, Hilmar.
>
>>Hi Hilmar,
>>Thanks for writing. As far as concern about making indivisual property I could not get how I can solve through form property. Could you give me some detail. how to handle through form property..please...
>>
>>Situation is I am having almost 50 types of variable for one form which is being used at different text..combo..grid...dtpicker...all type of component is used in form. Somany text using other text memory variable for certain validation. After input all information user pressing save button at that time also some validation required than updating almost 10 table. from memory vaiable.
>>
>>If I am running form directly its working fine without any error but if i call form through menu/prg its giving some time error at different different text. I tried many time to read all code which calls this form but no any clue.
>>
>>Solution please.
>>
>>TIA
>>>>Hi,
>>>>
>>>>I am declaring all variable in .prg and after declaration calling form.
>>>>At some text when pressing enter its accepting validation but at some text saying not found. If I am putting one linebefore validation at erroneous text like" Varname=Thisform.text1.value
>>>>Than its working perfectly.
>>>>Is declaring all variable for particular form in one .prg is ok or should I use some other way. Please guide.
>>>>
>>>>Thanks in advance,
>>>
>>>If you declare a local variable in a form, they are only visible in the procedure where you declare it - not in the form. Private variables should be visible also in forms you call from the PRG.
>>>
>>>To keep things tidy (orderly), you should usually declare all variables in the function or method where they are used. If you need a variable in several methods in a form, use a form property instead (ThisForm.MyProperty).
>>>
>>>HTH, Hilmar.
Sajjad Ahmad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform