Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating CA - Too Much Schema
Message
From
10/11/2003 14:39:09
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00847340
Message ID:
00848449
Views:
24
>>1) I have a CAClass built with CABuilder, all subclasses are in the same VCX file. I have created a DEClass and dragged my CAClass 'MyAddresses' into the DEClass. Now I have a DEClass. How do I get my form to use my DEClass?

>See DEClass and DEClassLibrary properties for the Form.

*** Sometimes, even the most simple answers seem too simple... thanks, I was busy trying to find something like those properties in the dataenvironment of the form.

>>2) I am wondering if I can CREATEOBJECT() with my CAClass 'MyAddresses', and then issue a browse to see what is there?

>Sure, but you have to call the CursorFill method first if it is not in a DE with AutoOpenTables set to true.

*** Well, that answers why it was not working just from the ca_.vcx...

>>3) I have one table with a huge number of fields. I understand the properties of CABuilder will not allow more than 255 characters. How do I generate a CAClass for this table (CaBuilder will not let me)?

>My CABuilder will create a CA for it. TO add it to the DE of a form, right-click in the DE and select the Builder option. Click the Cursors tab. Click the Add button, then select the CA you want to add to the DE from your CA class library. After you add a CA built by my CABuilder, you can delete all the default method code the DE Builder adds for you because it is already in the CA class.

>In my CABuilder ZIP file was another PRG file that you can use to create code needed to create a DBC with dummy tables with the same structures as your SQL Server database. These tables will be the same name as the alias of its corresponding CA in the VCX. You can drop these tables in the DE so you can drag-and-drop fields onto the form. After you are done, just delete that table from the DE and leave the CA. Since the table name is the same as the cursor name in the CA, all the fields you dropped on the form are bound to the correctly aliased field.

*** Brilliant.... it was hard enough dealing with real tables on my best days... but dealing with this abstraction is making me spin... but now I believe I am on the right track.... thank you so very much...

Ric
Previous
Reply
Map
View

Click here to load this message in the networking platform