Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CA Builder How to Mark McCasland Please
Message
From
11/11/2003 22:53:02
 
 
To
11/11/2003 22:28:04
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00848600
Message ID:
00848970
Views:
17
I was just going to tell you same thing... once I got around the CABuilder class structure, and the reason for the properties, I found it way cool...

My CA changeover has been progressing too fast for me to type. The hard part now is removing views and replacing with CA Class items. I have a few tables over the 255clim, so I am just doing them all. The benefit here is my own framework is also uses with some ADO queries as well, so I can just whip it over to ADO on the fly.

I was not too fussed on CA at first, but over the last three days I have been into it and now see some benefits. Letting the CA handle the filtering (exept for the occassional cSelectCmdFilter updates) has made things a zip.

Sorry about the Wallabies... in advance... *sigh*.... I am of course for the All Blacks... lol... however, the team to watch for a scare will be France. They kicked their game up four notches last week, and I think they are on a big roll with confidence. England is looking shaky against them.

Ric





>I was asking about runtime changes. This is best explained in an example.
>
>I have a screen where the user searches for a client. On selection, I have the client id. I need to pop up another screen, displaying this clients details for editing/viewing. So from the first screen(search) I pass the clientid as a parameter to the second screen. I then want the CA to do something like:
>
>SELECT client * from client WHERE clientid LIKE MyPassedClientid and return with all fields but only 1 record.
>
>After playing around with the CA builder class, I discovered hoe to do this as well as some other stuff.
>
>I now know that I have to set the custom class property cSelectCmdFilter to my where clause.
>
>I also discovered the cSelectOrderBy and the cSelectOtherClauses custom properties.
>
>One thing I wanted was NoDataOnLoad and there is a custom property for this:
>lNoDataOnLoad. This sets up the cursor as empty without doing a load of data. But what I discovered is that I then have to set this to .T. before calling the CursorFill method or nothing was loaded.
>
>Anyway I have got around that. I actually only use this builder when I need all the fields and I hit on the 255 chr limit. Otherwise I prefer using the built in Builder if I only need a few fields from the table.
>
>For this I have a generic class where I programmaticly set its properties and call CursorFill(0 to get the fields I need, and the VFP8 builder if I need to generate Updates for the fields.
>
>How's your project going, by the way?
>
>Go The Wallabies!!!!!
>
>Bernard
>
>>Hi Bernard,
>>
>>Are you asking how to change the parameter in runtime? or are you trying to do the change in development mode?
>>
>>Ric
>>
>>>This is mostly addressed to Mark..
>>>
>>>Hi Mark
>>>
>>>Thanks for your excellent builder. Real godsend as the first table I tried to create a CA for, I ran into the 255 chrs error and there was the CABuilder to save me.
>>>
>>>The question I have is :
>>>
>>>The SelectCMD sent for my CA is:
>>>
>>>SELECT * from client. But I want to parametize this like so:
>>>
>>>SELECT * from client where clientid = myClientVal
>>>
>>>Initially I have set the cursor to not load any data (property on CA)
>>>I want a user to select clientid and I then do a CursorFill() with this to retreive this record only for editing etc.
>>>
>>>I know I can modify the SelectCMD in the BeforeCursorFill() method, but when I go to this Intellisence does not show the Dataenvironment and hence the CA. So how do I address this so that my Parametizes statement is used instead?
>>>
>>>Unfortunately there is so little info about CA's on the net. The best was the article "Intro to CA" in the Code magazine.
>>>
>>>I am in the process of developing some CA classes for use in my app. I want to make them parametized and hence the above question.
>>>
>>>Thanks
>>>
>>>Bernard
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform