Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Operator/operand type mismatch
Message
De
30/10/2017 13:12:37
Sonny Tabano
Trams Printwork, Inc.
Mabalacat, Philippines
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Operator/operand type mismatch
Divers
Thread ID:
01655283
Message ID:
01655283
Vues:
68
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform