Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to set property manually for a field in a view
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01395547
Message ID:
01395612
Views:
53
Thanks, seems exactly what i wanted. I'll check and update.
Jaime

>>Hi
>>This is a basic sql-view question, but after many tries it still doesn't work, i'm probably missing something obvious.
>>I built a parameterized view manually - not through the designer, because it contains an UNION clause. One of the fields is just either 1 or 0, and serves as a record marking field in the grid that shows the view. No matter what i do, that field is read-only in the grid. How do i change it to readwrite? I don't need any other field updatable in the view.
>>
>>TIA
>>Jaime
>
>Jaime,
>
>It's not clear to me whether the problem is in the view - or in the grid
>If it's in the view try
>
>#ifndef TRUE
>	#define TRUE	.t.
>	#define FALSE	.f.
>#endif
>
>function do_it()
>
>	local ViewName, UpdatableField
>	ViewName = 'TheView'           && change
>	
>	UpdatableField = 'FieldName'    && Change
>	
>	local i, n, af[1]
>	
>	use (m.ViewName) in 0 NODATA
>	
>	n = afields(af, m.ViewName)
>	for i = 1 to n
>		=dbsetprop(m.ViewName+'.'+af[i,1], 'Field', 'Updatable', FALSE)
>	endfor
>	
>	
>	=dbsetprop(m.ViewName+'.' + m.UpdatableField,		'FIELD', 'Updatable', TRUE)
>	
>	=dbsetprop(m.ViewName, 'VIEW', 'SendUpdates', TRUE)
>	
>endfunc
>
Why do programs stop working correctly as soon as you leave the Fox?
Previous
Reply
Map
View

Click here to load this message in the networking platform