Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cursors
Message
From
08/10/2001 12:43:47
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00565563
Message ID:
00565566
Views:
22
>I am trying to move data from a populated cursor (cCursor2 and cCursor3) into another cursor that I created (cCursor). When I try to "append from dbf('cCursor2')" I keep getting an error saying "Alias is not Found". Is it valid to be able to move information from a readonly cursor (cCursor2 and cCursor3) to a read/write cursor (cCursor)? Below is the code I am using:
>
>
>
>cCursor = SYS(2015) &&generate random name for cursor
>cCursor2 = sys(2015) &&random cursor 2
>cCursor3 = sys(2015) &&random cursor 3
>
>
>create cursor (cCursor)( pp c(7), fname c(25), totpay n(8,2), fica n(8,2), retire_amt n(8,2), ;
>health_ins n(8,2), retiree_med n(8,2), unempins n(8,2), wrkcompins n(8,2), ;
>total_salary n(10,2))
>
>ppdays1 = (LowValue - bd) + 1 &&number of days in first pay period
>ppdays2 = (ed - HighValue) + 1 &&number of days in second pay period
>
>select distinct pp from payroll_tbl where edate between (Lowvalue) and a__gen2(gpos2+1,1) into array a__gen10
>
>a_cells = _tally
>
>select pp, fname, (totpay)/ppdays1, (fica)/ppdays1, (retire_amt)/ppdays1, ;
>(health_ins)/ppdays1, (retiree_med)/ppdays1, (unempins)/ppdays1, (wrkcompins)/ppdays1, ;
>(total_salary)/ppdays1, ssn ;
>from payroll_tbl into cursor (cCursor2) where payroll_tbl.pp = a__gen10(1,1) order by fname
>
>
>select pp, fname, (totpay)/ppdays2, (fica)/ppdays2, (retire_amt)/ppdays2, ;
>(health_ins)/ppdays2, (retiree_med)/ppdays2, (unempins)/ppdays2, (wrkcompins)/ppdays2, ;
>(total_salary)/ppdays2, ssn ;
>from payroll_tbl into cursor (cCursor3) where payroll_tbl.pp = a__gen10(a_cells,1) order by fname
>
>select (cCursor)
><b>append from dbf((cCursor2))				
>append from dbf((cCursor3))</b>
>
>Thanks
>Nick Patel

Nick,

See changes in bold above.
Steve Gibson
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform