Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Updating a view column that is an expression
Message
De
08/03/2018 14:37:41
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
08/03/2018 13:51:00
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012 R2
Network:
Windows Server 2012 R2
Database:
Visual FoxPro
Application:
Desktop
Virtual environment:
VMWare
Divers
Thread ID:
01658618
Message ID:
01658629
Vues:
49
>Exactly right - I only posted back the change to see if issuing the DBSETPROP() would allow me to post back to that field - because yes, the view designer, even if I change the value to .T. for updatable, it changes it back to .F. before updating the dbc.
>
>So I am going to switch to a programatically created view since I have to set the property on this calculated field(s) anyhow and it would save changing the view in the VD and then me forgetting to issue the commands for each field after the fact.
>
>So I still have to leave my code in to encrypt the fields in the view just before doing the tableupdate(). There is no other way to fire encrypting them just before the tableupdate happens (i.e. no built in way to fire some code).

There is - beforecursorupdate and similar events in cursoradapter, where you can do whatever you want, and it fires exactly when it says - i.e. between tableupdate() and the actual sending of the record to the source table. If you define your cursoradapter as a prg-based class, you can do what you want.

>I have never used the cursoradaptor class - are there methods in there that fire just before a tableupdate? I looked in help and it seems that a BeforeCursorUpdate() fires where I could put code. But I am not sure if I am barking up the wrong tree as I use a data environment where views are loaded (the old fashioned way). I would have to find some examples on how to a) attach a cursoradaptor to the DE and then make it work - without changing anything in the rest of the form(s) as this all works within a framework (VMP).

For that part, I'd simply remove the cursor object for that alias from the DE and put a cursoradapter programmatically - simply this.addobject("caAcct", "myCAclass") or something like that. Frankly, haven't used a cursor object in a long time, everything has a CA object which is then a member of a biz object... that's the architecture where I'm at home, so... I'm the wrong guy to talk about DE.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform