Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with recursion and 'INTO ARRAY' clause
Message
De
19/04/2006 16:52:28
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01114610
Message ID:
01114761
Vues:
14
Thanks you both for the replies.

I've figured out the problem. I had two places that I was calling my routine to write the array values out to the BOM cursor. Well in one of them I had left off a parameter so the routine was picking up .F. (logical) for the parameter I failed to pass. Perfect example of a decent routine screwed up by a stupid mistake.

Thanks again for the help and I'll try to not bother you guys with stupid oversights in the future.

Greg

>Greg,
>
>What VFP version are you using. I remember having similar problems in VFP6 and had to use non-SQL commnads in UDF. See Re: How To: Group Data and club a field of the group using S Thread #763525. I just rertested in VFP8 and VFP9 and code from above thread works with SQL.
>
>>I have a recursive procedure to break out bill of materials. I'm using recursion because low level sub assemblies must have their costs 'rolled up' into higher level assemblies. Because it is recursion, I'm pretty much forced to resort to "INTO ARRAY" clause in SQL instead of using cursors or tables.
>>
>>Ironically, all the pricing and cost rollup works just fine. That was the part I expected to be the biggest headache when I started.
>>
>>Instead the array returned from the "into array" for some reason seems volatile for my character fields. Sometimes there will be a logical in one of the columns of the array that are defined as character in the table structure. To make it more confusing the type just doesn't seem consistent through all rows. In other words things maybe just fine until row 150 and then my 3rd column has type logical and no data. But at the same time the third column, unit of measure field for example, has data in every single record. It also seems that in some results that I get nothing but logical (.F.) in every row of that array despite knowing data should be in every field.
>>
>>Is there known glitches or workarounds that I need to do when using the "INTO ARRAY" clause? Am I missing something obvious here? If I wasn't using recursion I would just switch to cursors.
>>
>>
>>My basic code looks like this:
>>
><snip>
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform