Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
When parameter not found
Message
De
05/01/2009 08:00:43
Metin Emre
Ozcom Bilgisayar Ltd.
Istanbul, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
01370321
Message ID:
01370975
Vues:
21
>>>>Hi All,
>>>>
>>>>I use some parameters with cursoradapter. When doing requery() if VFP couldn't find the parameter it wants me a parameter. It makes harder to find bug. I want if VFP couldn't find the parameter it occurs an error. Is this possible?
>>>
>>>You could put an assert command right before your select statement;
>>>
>>>
>>>
>>>ASSERT TYPE("lcMyParm") = "C" "You must supply lcMyParm as a character string to the SELECT statement"
>>>
>>>SELECT Blah, blah, WHERE MyField = ?lcMyParm ...
>>>
>>>
>>
>>It ask parameter yet...
>
>Metin,
>
>I expect that you will insure that the parameter exists at runtimte and this is for your development. to get the assert to owrk you need to SET ASSERTS ON globally in your application. I suggest that you do this in the start up when you are running the application in developer mode, this way you will get the assert message but your users will not.


PRIVATE xx
SET ASSERTS ON
xx="001"
ASSERT TYPE("xx") # "U" mess "You have to put a parameter"

ocs("stok",,,"select * from stok where kod=?xx") &&---- this is my cursoradapter sub-class ---


when I run a requery() outside of this procedure I want to see a message "You have to put a parameter" but it ask me parameter at an inputbox...
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform