Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Trying to come up with a view/CA model
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01410693
Message ID:
01411199
Vues:
46
This message has been marked as a message which has helped to the initial question of the thread.
>>>>>Thanks a lot again.
>>>>
>>>>You could add a properties to that class and instead of variables use these properties as parameters.
>>>>Then when you need to refresh/fill CA you could set them to the right values.
>>>
>>>That's a great idea and we have our CAs (for other applications) designed this way. Now I only have to know, if this idea is OK with VPM.
>>>
>>>Also, how would I refer CA added to the form in DE?
>>
>>
>>thsiform.DataEnvironment.CAObjectName
>>
>>NO Intellisence for DE :-)
>
>Hi Borislav,
>
>Putting default values in CursorFill using code such as
>
>LPARAMETERS luseCursorSchema, lNoData, nOptions, Source
>IF VARTYPE(m.getOptionID) <> "N"
>   PRIVATE getOptionID
>   getOptionID = 0
>ENDIF
>IF VARTYPE(m.getMakeID) <> "N"
>   PRIVATE getMakeID
>   getMakeID = 0
>ENDIF
>IF VARTYPE(m.getModelIDs) <> "C"
>   PRIVATE getModelIDs
>   getModelIDs = ""
>ENDIF
>
>LOCAL llRetVal
>llRetVal = dodefault(luseCursorSchema, lNoData, nOptions, Source)
>
>NODEFAULT
>
>if not m.llRetVal && There was an error trying to execute CursorFill
>	local laError[1]
>	aerror(laError)
>	if laError[1,1] <> 1839
>		=Messagebox("Error trying to execute CursorFill method: " + laError[1,2] + ;
>			chr(13) + chr(10) + "SelectCMD is " + this.selectcmd)	
>	endif
>endif
>
>return m.llRetVal
>
>Seems to get me one step father in the direction of making this form to work.
>
>Do you see any problems / possible failures with this approach?
>
>I have another question regarding movers logic. I'll write a new thread.


The only backwards I see is that if you add new parameter in SelectCmd you may forgot to add it in the method.
Also I really prefer properties, because you can have getOptionID somewhere and may be related to that CA.
Imagine you prepare some report and you define that variable to use it in report and after the report is finished you call CursorRefresh() of CA. I am sure you won't do this (I did it!!!) but that is an imaginary situation :-)))))
And because I did it once I prefer to use Properties :-))))
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform