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:28:04
 
 
To
11/11/2003 21:47:55
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00848600
Message ID:
00848964
Views:
18
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