Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Remote view question
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00456273
Message ID:
00456328
Views:
23
>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
>
Yuri,

That's kind of along the lines of what I was thinking. I also rejected it as being more complex than simply modifying the view in the designer.

As I've (unfortunately) found out, using MODIFY VIEW and trying to programmatically manipulate the designer doesn't work (that was my crazy idea). I was hoping to be able send the keystrokes necessary to the designer. Unfortunately, MODIFY VIEW stops any program execution and doesn't support the NOWAIT clause.:-(

All is not lost, however. There's on more thing to try. Perhaps the Windows Script Host and a bit of VBScript might do the trick. The idea is to run a VBScript file from within FoxPro that will:

1. Wait until the view designer appears.
2. Use the SendKeys method of the WScript.Shell object to send the appropriate keys to the VFP window.

If I can get it to work, I'll post back.
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform