First of all, this is "step 8" from your code:
* step 8--Agg Type 1: copy CuDed1Emp to CuDedEmp But, please forgive me if I don't explain carefully, but I will try once more.
You have shown, in fragments, some code which errors. And you have shown "modified" code which runs without errors, but with some offending lines commented out.
But you don't show what I ask for, so please try again. I need the complete code as is is when it fails! I hope that is clear, I want the whole code, EXACTLY as it is when you get the errors. No workarounds, and no commented out lines. Absolutely no code must be commented out, since these lines only cause confusion. In other words, please show me the complete code which fails!
>Sorry, I overlooked that. But the line marked Step 8, is that run? If so, this line causes the error. You Copy to file CuDedEmp, which creates a real table, but you never Use CuDedEmp. In other words, no table is in use when you Append from DBF()....!
>
>1. Copy CuDed1Emp to CuDedEmp && Creates a real table, effectively closing the cursor with the same name!
>2. SELECT CuDedEmp && fails because CuDedEmp is not open!
>3. APPEND FROM (DBF("CuDed1Emp") && Fails since no table is open
>
>If "Step 8" never is run, I once again ask you to show the code, exactly as it is when it fails. The code you have shown always has some offending lines commented out, how can I know exactly which lines are commented out? I want the failing codes without any code commented out.
>
>Hi Tory,
> I'm not sure what you mean by "the line marked Step 8". Step 8 consists of a few lines.
> The code that fails is commented out. Specifically, "APPEND FROM" fails. The first line (SELECT CuDedEmp) executes successfully.
>
>Thanks, Chaim