>>>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.