Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Memo Field in a Grid - refuses to update
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00588744
Message ID:
00588802
Views:
24
Caroline,

I tested this view in command window. All changes work fine. Here is my test:
lnIDLow =  0
lnIDHigh = 1000
lcStWkHigh = 'RI200148'
lcStWkLow = 'RI200144'
requery('FilingView')
brow
SELECT 1
BROWSE LAST
?tableupdate(0,.t.,'FilingView')
requery('FilingView')
I changed Memo, and after TableUpdate and requery() my changes are there.

Now, here is my form problem:
I type something in the Memo, go to another record in the upper grid, then back - my changes are not saved. I change it again, repeat this procedure, this time I see my old changes. What may cause this weird problem?


>Nadya,
>
>Just a thought but if you are bringing up a window to do the editing in could you not do the tableupdate it the Save/Ok button on that form and a revert in the cancel?
>
>I know this doesn't solve the problem but it may get the code working till you can trace the actual cause.
>
>>Hi everybody,
>>
>>Sorry for starting another thread, but I'm in desperate. I have a local view based on one table. Table is called FilingDate, view is called FilingView. It has one memo field called Notes. I have two grids in my form:
>>upper grid is BatchCntrl, the other one (related) is FilingView grid. Here is a code in BatchCntrl.AfterRowColChange:
>>
>>lparameters ncolindex
>>local m.lnRecno
>>lnRecno = recno('BatchCntrl')
>>if this.nCurRec <> m.lnRecno
>>	with thisform		
>>		if getnextmodified(0,'FilingView')>0
>>			=tableupdate(0,.t.,'FilingView') && Update the record, so it would not complain
>>		endif		
>>		if .nDsID <> BatchCntrl.DsID and not .bFullFDView
>>			.nDsID = BatchCntrl.DsID
>>			lnIDLow =  BatchCntrl.DsID
>>			lnIDHigh = BatchCntrl.DsID
>>			lcStWkHigh = .ThisState + .ThisYr + .ThisWk
>>			lcStWkLow = .cLowWeek
>>			requery('FilingView')
>>		else
>>			local lcSetNear
>>			lcSetNear = set('near')
>>			set near on
>>			=seek(BatchCntrl.rcode + BatchCntrl.town + ;
>>			BatchCntrl.ExtrYear + BatchCntrl.ExtrWeek,"FilingView","rcTownWeek")
>>			.grdFiling.nCurRec = recno('FilingView')
>>			.grdFiling.refresh()
>>			if m.lcSetNear = "OFF"
>>				set near off
>>			endif
>>		endif
>>		this.statusbartext = "Record " + transform(m.lnRecno)+" of "+ ;
>>			transform(reccount('BatchCntrl'))+ " records in BatchCntrl..."
>>		.refresh()
>>		.NavStand.navUpdate()
>>	endwith
>>endif
>>dodefault(m.ncolindex)
>>
>>I also added TableUpdate in grdFiling.AfterRowColChange and grdFiling.Valid. There are other places, when TableUpdate is called as well. I don't see any error's reports. However, if I change something in the memo, then go to another record in the BatchCntrl grid, then go back to my original record, my changes are reverted back to the original. If I repeat this procedure, but change something again, I now see my previous change. Our form has its own Error Handler. However, errors are not reported, so I think, tableupdate worked fine.
>>
>>I use standard textbox in a grid for memo field. DoubleClick brings a window for editing...
>>
>>Could you please advise, what could be wrong here? Same view works from command window and update Memo field correctly.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform