General information
Category:
Coding, syntax & commands
If you have a better approach, I'd love to hear it!
I have a couple of fields (product.desc, product.value) in some tables that appear to be SQL keywords. My forms use views/tableupdate(). The tableupdate() generates an error whenever I change the "desc" or "value" field (I think the code it generates is something like UPDATE product SET desc = "foo", instead of UPDATE product SET product.desc = "FOO" which would work).
It is a tremendous amount of work to rename the field, due to legacy systems.
Many solutions have been bounced around, but I've had luck with only 2:
* make the "desc" field non-updatable in the view, and then manually stuff the value in after the tableupdate() - this works, but scares me (and is ugly for child tables using table buffering)
* use the dbc to keep the fields mirrored - the legacy code can reference "desc" while the GUI forms can reference "cDesc"
The mirrored field idea seems to work fine (implementing the synchronization during the record-level rule). But, documentation seems to imply I shouldn't be doing this.
I know the "clean" solution is simply to rename the field. But, this is a real-world app, and that just isn't possible. So, I'm looking for the best possible work-around.
Bob
>Just out of curiosity... any particular reason why would you want to do something like this. I am sure there is one.... but maybe there is a better approach.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only