Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Clearing Memvar 1

Status
Not open for further replies.

bebbo

Programmer
Dec 5, 2000
621
GB
I've got code similar to the one below in my program, where I insert data into a table from memvar. At no stage do I clear this memvar. I guess I shopuld be if so how?

thanks

m.posid = CHOSENTILL
m.alltills = .F.
m.LastZ = Zhistory.Lastz + 1
m.date = date()
TimeStr = TIME()
MyTime = VAL(SUBSTR(TimeStr, 1, 2) + SUBSTR(TimeStr, 4, 2))
m.Time = MyTime
m.period = 1
m.Aborted = .F.
m.from = firsttran
m.to = lasttran
With Thisform.CNT1
m.Actual2 = val(.Acttend2.value)
m.Actual3 = val(.Acttend3.value)
m.Actual4 = val(.Acttend4.value)
m.Actual5 = val(.Acttend5.value)
Endwith
INSERT INTO ZHistory FROM MEMVAR
 
Hi Bebbo,

These SCATTER MEMVAR are local variables and so you dont have to worry. They get lost when the form is released or the call to that method is completed.

If you are declaring them, public then only you need to release it.

If you need a public such memvar collection, best way is to use..

SCATTER MEMVAR NAME myName

So you can reference that as myName.posid etc..
So clear the object is very easy.

:)




ramani :)
(Subramanian.G)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top