Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Local View doesn't return row
Message
 
To
19/01/2006 16:37:59
Steve Summers
Pima County Superior Court
Tucson, Arizona, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01088535
Message ID:
01088683
Views:
16
>>>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform