Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is there a utility to convert views to cursoradaptors?
Message
 
 
To
01/12/2003 13:17:03
Mike Sue-Ping
Cambridge, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00854002
Message ID:
00854783
Views:
17
>Mark,
>
>>I do not think there is.
>
>That's too bad for me.
>
>> The utility Bill refers to is, I think, my CA VCX Builder that will create a CA for every table in a DBC, SQL Server database or Oracle schema.
>
>Why did you stop at tables only? Couldn't the same coding be done for views and hence be the utility I need :)

This builder creates a VCX based on the tables it finds in a DBC or SQL DB and not in the DE of all your existing forms. That was my goal in creating this builder. I have not found a good generic method of creating CAs for views that exist in DBCs, SQL Server or Oracle. Dealing with the tables in these DBs was fairly straight forward.

>>This is probably a better solution than generically converting cursors in a DE to CAs.
>
>Why so?

I would say that screwing with objects in someone's forms to convert objects to something else is quite a daunting task and has numerous potential failure points. While others may be comfortable doing that, I am not.

Besides, working with a CA subclass added to the DE from a VCX is much more maintainable than individual CA classes added to DEs. If the DataSource/Type changes, all I have to do now is change this ONE time in my CA baseclass and all the CAs I have added to the DE of my forms still work. If anything about the source table for a particular CA changes, I only have to change the CA subclass in my VCX, and I do not have to worry about which forms that CA has been added to.

If you used my builder to create the VCX, you could easily add the appropriate CA to the DE of your forms while deleting the existing cursors. Just make sure the alias specified in the CA is the same as the alias of the corresponding cursor you remove from the DE.

I would still encourage you to download my 2 CA zip files from the FoxPro Tools link at http://www.mctweedle.com where you will at least get the builder and sample code that you can learn quickly from.
Mark McCasland
Midlothian, TX USA
Previous
Reply
Map
View

Click here to load this message in the networking platform