Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Set persistent view properties programmatically
Message
 
À
19/01/2001 08:33:25
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00465654
Message ID:
00465668
Vues:
10
>Since I can´t visually handle a view with more than 2 tables, I decided to create a new view using commands.
>
>Some properties, like SendUpdates, may be set using DbSetProp.
>
>But I don´t know how to define the key and updatable fields from the command window and make them persistent (store that in the db).
>
>Do I have to set these properties each time the view is opened using cursorsetprop?
>
>TIA


Here a simple example of a view created and wit properties set at runtime that are stored in the database
	Create SQL View Groepen As;
	Select Kostgrp.groep, Kostgrp.omschrijvi, Kostgrp.glassoort, Kostgrp.printen,;
	  Kostgrp.bestgrp, Kostgrp_a.omschrijvi;
	 From  flexdata!kostgrp Inner Join flexdata!kostgrp Kostgrp_a ;
	   On  Kostgrp.bestgrp = Kostgrp_a.groep;
	 Order By Kostgrp.groep

	DBSETPROP('Groepen','View','Tables','Kostgrp')
	DBSETPROP('Groepen.Groep', 'Field', 'UpdateName', 'Kostgrp.groep')
	DBSETPROP('Groepen.glassoort', 'Field', 'UpdateName', 'Kostgrp.glassoort')
	DBSETPROP('Groepen.omschrijvi_a', 'Field', 'UpdateName','Kostgrp.omschrijvi')
	DBSETPROP('Groepen.printen', 'Field', 'UpdateName', 'Kostgrp.printen')
	DBSETPROP('Groepen.Bestgrp', 'Field', 'UpdateName', 'Kostgrp.bestgrp')

	DBSetProp('Groepen.Groep','Field','KeyField',.T.)
	DBSetProp('Groepen.Glassoort','Field','KeyField',.T.)
	DBSetProp('Groepen.omschrijvi_a','Field','Updatable',.T.)
	DBSetProp('Groepen.printen','Field','Updatable',.T.)
	DBSetProp('Groepen.bestgrp','Field','Updatable',.T.)
	DBSetProp('Groepen','View','SendUpdates',.T.)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform