This must be fairly simple, but I can't find the answer. I have some local views I need to change through a program. I have some code to create them, but can't seem to find a command(s)/code that will allow me to add/remove fields.
After further review (just a joke), I think I have to recreate the entire view in code and execute the code on the customer's server. I can probaly get the entire code from scripting the db.
The usual way is to use DBGETPROP() to get the existing view definition (that is, the SQL statement that defines the view). Pass the name of the view, the word "VIEW" and the word "SQL".
You can then alter the SQL, and recreate the view, using CREATE SQL VIEW.
Could be you already discovered this for yourself, but I thought I would mention it for the sake of completeness.
Mike
__________________________________
Mike Lewis (Edinburgh, Scotland)
Just a follow up. I used GENDBC to generate the program to create the DB. I copied the code in that program that generates the views I needed to a new procedure that can be run from within my exe. Worked with no problems.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.