General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
George,
One of the programming way could be:
Create reference table having structure for view and add it to the database.
In the program:
- after open data create temporary view as select * from table
- compare afield() and/or field() with reference structure documenting changes
in field names in cursor or array
- scan cursor/array and create sqlstring like sele newfield as oldfield..
- use this sqlstring to create a view
Hope this help
>>>>>>>>>>>>>>>>>>>>>> previous messages below
>Hi George,
>
>You may generate the code for your remote views with GENDBC.PRG (I think some of view utilities on UT generate the full code for the selected view too.), and then update the code and re-run it when needed to recreate the view.
Nick (et al),
Believe me, I've thought about GENDBC.PRG. Unfortunately, running the code it generates, plus the modifications that would be required isn't as simple as simply modifying the view, making a change and saving it, since the problem is that the new or modified field changes aren't included unless the one of the views is modified once. What I was really hoping for was something like a command or series of commands that could do this. Something like, UPDATE VIEW < viewname > would be terrific.
I've thought about writing code that would connect to the source, getting the field names and types, parameters, etc., drop the existing view and re-generate it, but that's more work than I want to tackle at the moment.
I've got a crazy idea that I'm going to try out, and if it works I'll post back.
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