Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Add memo field to cursor
Message
De
11/02/2016 00:14:57
 
 
À
10/02/2016 21:17:13
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
01631223
Message ID:
01631225
Vues:
132
This message has been marked as the solution to the initial question of the thread.
>Hi. I want to add an initially empty memo field to a cursor I create, and I thought the following syntax would be appropriate:
>
>
>select ... cast("" as M) as Missing, ...
>  into cursor cur1
>
>
>But I get the error message: "Operation is invalid for a Memo, Blob, General or Picture field.". If I remove this one field, everything works fine.
>
>No field is referenced by number in an ORDER BY or GROUP BY clause - I thought at first that that might be the problem.
>
>Any ideas?
>
>For more details, I copy the entire command below.
>
>TIA,
>
>Hilmar.
>
>
>The entire command is as follows:
>
>
>SELECT SPACE(1) as MatProblem, CAST("" AS M) AS Missing, Cut.Line, priority, bname as Customer, cut.CUT, cut.description as Desc_Cut, style.STYLE,;
>		style.description as Desc_Style, DUEDATE, cut.total, totstd,cutdate,;
>		00000.00 as timetictot,00000.00 as timetic, 00000.00 as balance,00000.00 as diasf, 0000000.00 as horasf,;
>		DATE() as fec, 00 as horad;
>	FROM cut, cutdtl, style, customer;
>	WHERE cut.custcode = customer.code;
>	AND cut.cut = cutdtl.cut;
>	AND cutdtl.style = style.style;
>	AND duedate >= thisform.text1.Value AND duedate <= thisform.text2.Value;
>	AND EMPTY(dtcompl);
>	AND cut.total > thisform.text10.Value;
>	&lcExtra1 &lcExtra2;
>	ORDER BY Priority, DueDate;
>	DISTINCT;
>	INTO CURSOR cur1 READWRITE 
>
>
>The debugger shows me that lcExtra1 and lcExtra2 are empty strings; I used the variables to conditionally add additional conditions.

It looks like the DISTINCT clause is the issue: https://support.microsoft.com/en-us/kb/813361 , search for "error 34" (about half way down). You could use a workaround suggested there, or SET ENGINEBEHAVIOR 70 for this SELECT.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform