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:
00588783
Views:
28
>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 Caroline,

My form has Save/Revert buttons. If I hit Save button, my changes are saved. It uses DoTableUpdate method of the form with more complicated logic.
I just invoke simple tableupdate(0,.t.,'FilingView') in any place, I can think of (Grid.ARCC, Grid.Valid, Upper grid.ARCC, some other places, etc.) Still it seems, like FilingDate table (underlyaing) is not always properly updated. Could it be, that field name "Notes" causes this strange effect? I will re-test it again in Command Window. I open view with tablebuffering=5. FilingDate table is opened without any buffering...



>>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
Reply
Map
View

Click here to load this message in the networking platform