Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Are CursorAdapters worth the trouble?
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00882205
Message ID:
00882398
Views:
12
Use ADBObjects() to get an array of views in the DBC
Use SQLGETPROP() to get the SQL used to create the views as well as other info about the view that you need.

I agree this is quite a daunting task. One problem, but can be done, is to parse throught the SQL to find the WHERE clause than parse that to find the parameters. You then need to parse the SQL to get the list of tables. Once you have the table, you can get the PK field list using the methods I used in my CABuilder.

While this does not help you now, I like a challenge and my take this on sometime in the near future.

>Thank you.. I had found the article earlier and found it helpful.
>
>The main issue I'm concerned with at the moment is the task of creating cursor adpaters for all the remote views and SPTs that are currently in the applications.
>
>I can't just cut and paste the Select statements into the builder.. most of them exceed the 255 character limit.
>I can't use the builder normally to create them: Partly because they exceed the limit, partly because the vfp builder makes assumptions about the join conditions which are invalid in our case.
>
>I have looked at what it would take to extend Mark's builder to handle views, and it doesn't look all that straight forward, for the following reasons:
>Just switching his code from tables to views won't work:
>1. He opens up the table(view) to get the structure.. but almost all of our remote views are parametrized, and since the parameter doesn't exist, the program would need to stop each time and ask for appropriate parameters.
>2. I believe the code would also need access to the underlying tables to get the primary keys, etc.. (not sure of this..).. but in our case the underlying tables are in a different dbc from that in which the remote views reside. Opening up both dbc's would thus require managing switching back and forth between them at various places..
>
>No doubt this can all be done.. I'm just not yet sold on whether its worth the trouble.. as opposed to moving everything over to SPT..
>And I'm wondering what people's experience has been when they tried to use CA's with real apps (rather than just small demonstration tables and views)..
>
>Ilmar
Mark McCasland
Midlothian, TX USA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform