Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Local View doesn't return row
Message
 
À
19/01/2006 16:37:59
Steve Summers
Pima County Superior Court
Tucson, Arizona, États-Unis
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
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01088535
Message ID:
01088683
Vues:
15
>>>During design, view works great. At runtime, the view returns no data. This must be an environment setting? Here is the code:
>>>
>>>If ! Used("View1")
>>> Use View1 In 0 Nodata
>>>Endif
>>>Select View1
>>>vwClassID = This.IDKEY
>>>Requery()
>>>
>>>Any ideas?
>>
>>Are you sure This.IDKEY had the value that match WHERE clause of the view? May be no records in table(s) involved in the View have recirds that match This.IDKEY.
>
>Thanks for your reply.
>This.IDKEY did have a valid integer. I have done some testing since this post. The code works great when I test the class by it's self. The code fails when I run the application. This makes me think it’s an environment issue. There is other code that should fail but the debugger skips right over it? This project was a VFP6 project and I'm updating it to VFP9.

What Requery returns?
It must return 1 if successfuly retreive the data.
What happens if you do:

1.
Select View1
vwClassID = some_value_that_you_are_absolutely_sure_you_get_some_data
? Requery("View1")
2.Check _TALLY
Select View1
vwClassID = This.IDKEY
? Requery("View1")
?_TALLY
3. Also you could copy and paste select clause of the view:
vwClassID = This.IDKEY
(SELECT clause of the view here) INTO CURSOR crsTest
SELECT crsTest
BROWSE NORMAL
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