Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Local View doesn't work right
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Local View doesn't work right
Miscellaneous
Thread ID:
00795725
Message ID:
00795725
Views:
46
When I run my form, it has always worked properly, but all of a sudden something has gone wrong, which makes me think that this is a data issue. When I extract the SQL code out of my form's Local View and run it while in debug mode, I am able to generate a result.

But, when I use the same local view (containing the same SQL code), it doesn't obtain the result at all and comes up with an empty data set. Is there some quirk in VFP Local Views that does this on occasion?

The SQL code relies on a parameter value being present. While in debug mode, I have seen that the data value is present.

The SQL code in the local view is as follows:
=============================================
SELECT Projects.project_no, Projects.proj_name;
FROM projects;
WHERE Projects.project_no = ?ThisForm.cProject_No

The code in the form:
==============================================
WITH ThisForm.PgfProject.Page1
IF NOT(EMPTY(This.Value)) AND ;
(LEN(ALLTRIM(This.Value)) = ThisForm.nProjectNoLength OR ;
LEN(ALLTRIM(This.Value))= 1 )
ThisForm.cProject_No = ALLTRIM(This.Value)
=REQUERY("V_ProjectsPI")

===============================================================
The =REQUERY("V_ProjectsPI") code generates the above SQL code.

Why it doesn't work within the view, I do not understand. Does anyone understand this?

Cecil
Next
Reply
Map
View

Click here to load this message in the networking platform