Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Append from Cursor
Message
From
15/07/2006 08:47:24
 
 
To
15/07/2006 08:24:45
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 8
OS:
Windows '98
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01136645
Message ID:
01136658
Views:
9
hi,
i try as
Append from dbf('crsDist '), error message
Alias is not found
thanks


>What is THIS for this code? Also, isn't your cursor name crsDist instead of grdDistribution? That's what you should be referencing in your append code.
>
>>hi,
>>this is the code at my form
>> command button---> click event
>>
>>      Create Cursor crsDist (From d, To d, Amount Y,txtName C(19),txtPrincipal Y)
>>          For ix=0 To .txtMonths.Value
>>        ldCurrent = Gomonth(.txtStart.Value,m.ix)
>>        ldFrom = Iif(m.ix = 0, m.ldCurrent, ;
>>          Date( Year(m.ldCurrent), Month(m.ldCurrent), 1))
>>        ldTo = Iif(m.ix = .txtMonths.Value, m.ldCurrent,;
>>          Gomonth(m.ldCurrent,1)-Day(Gomonth(m.ldCurrent,1)))
>>        Do Case
>>          Case m.ix = 0
>>            lnAmount = m.lnPayment * ((Day(m.ldTo)-Day(m.ldCurrent))/30)
>>          Case m.ix = .txtMonths.Value
>>            lnAmount = m.lnPayment * ((Day(m.ldCurrent)-1)/30)
>>          Otherwise
>>            lnAmount = m.lnPayment
>>
>>        ENDCASE
>>        M.ASD=THISFORM.TXTNAME.VALUE
>>       M.txtPrincipal=THISFORM.txtPrincipal.VALUE
>>        Insert Into crsDist (From,To,Amount,txtNAME,txtPrincipal) ;
>>          values ;
>>          ( m.ldFrom, m.ldTo,m.lnAmount,M.ASD,M.txtPrincipal)
>>      Endfor
>>      Locate
>>      .grdDistribution.RecordSource = 'crsDist'
>>      .grdDistribution.Visible = .T.
>>
>>
>>thanks
>>
>>>Ok, then that is your problem. It is not open, or at least it is not available where this code is run. How is grdDistribution created? Where is it created? Is this a form? Classes? The more detail information you can give - code examples - the better.
>>>
>>>>hi,
>>>>
>>>>thank you for replay,
>>>>i got error message
>>>>'grdDistribution.dbf' dose not exist
>>>>
>>>>thanks.
>>>>
>>>>
>>>>
>>>>>Does this not work? What is happening? Errors or just no data?
>>>>>
>>>>>
>>>>>use mytable in 0
>>>>>SELE MyTable
>>>>>locate for ....
>>>>>if !found()
>>>>>   Append from grdDistribution
>>>>>endif
>>>>>
>>>>>
>>>>>
>>>>>>hi all,
>>>>>>
>>>>>>i need to append from cursor to my table as..
>>>>>>Create Cursor crsDist.........
>>>>>>.
>>>>>>.
>>>>>>Locate
>>>>>> .grdDistribution.RecordSource = 'crsDist'
>>>>>>
>>>>>>i try as under....not work
>>>>>>
>>>>>>use mytable in 0
>>>>>>locate for ....
>>>>>> if !found()
>>>>>>*Append from dbf('grdDistribution') && rong
>>>>>>*Append from DBF(grdDistribution.RecordSource = 'crsDist')&&rong
>>>>>>*append from cursor ('crsDist')&&rong
>>>>>>*append from  (crsDist.cursor)&&rong
>>>>>>else
>>>>>>.
>>>>>>.
>>>>>> endif
>>>>>>
>>>>>>thanks.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform