Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Operator/operand type mismatch
Message
From
30/10/2017 13:12:37
Sonny Tabano
Trams Printwork, Inc.
Mabalacat, Philippines
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Operator/operand type mismatch
Miscellaneous
Thread ID:
01655283
Message ID:
01655283
Views:
66
Hi everyone,

I'm at lost why this particular value in a text box "2017" doesn't match the fieldname (paystart) while the rest does like "2016", "2015" and the likes except "2017 as mentioned. I dont know what i might be missing out.

here is the sample code
** in a form there is a text box where one has to key in the year (.txtYear.value="2016")
** A.paystart is a datefield in ORlist table

local ldYear

With Thisform
     ldYear =  .txtYear.Value
endwith

SELECT A.paystart, A.clientID, B.ClientName, A.Amount FROM ORlist as A Left Join Client as B ON A.ClientID=B.ClientID;
WHERE YEAR(A.paystart)=VAL(ldYear) INTO CURSOR CollectAmt ORDER BY A.clientid
The results displays everything for any other year except "2017" and I have no idea why is it like this for this particular year 2017 and would always result into an operator/operand type mismatch error message.

Any idea or tips on what i might be missing in this code?

Thanks in advance

Sonny
Next
Reply
Map
View

Click here to load this message in the networking platform