Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with recursion and 'INTO ARRAY' clause
Message
 
 
To
19/04/2006 11:26:43
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01114610
Message ID:
01114646
Views:
17
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>
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform