Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Append from grid
Message
From
07/03/2006 06:33:20
 
 
To
07/03/2006 06:06:32
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01101962
Message ID:
01102002
Views:
18
Please read my messages more carefully! You, not I, have to change the text for !empty(csrMyCursor.bookno) and !empty(csrMyCursor.sticket) and !empty(csrMyCursor.eticket) in my Append from line, so that the conditions match your need! I gave you the solution several hours ago, but YOU must modify it to suit your particular need. I can not know how you define a record empty, is it empty if one of the fields is empty, or is it empty if all fields are blank, or what? Only you know, and that's why YOU must change my code.

>hi,
>i try as under , but still
>
>cAlias = Thisform.DataEnvironment.InitialSelectedAlias
>Select (cAlias)
>IF act_flag="1"
>     GO BOTTOM
>      LOCATE FOR UPPER(shipno) =alltrim(thisform.text1.Value) AND  act_flag="1"
>        IF!FOUND()
>                       Append from dbf('csrMyCursor') for !empty(csrMyCursor.bookno) ;
>            and !empty(csrMyCursor.sticket) and !empty(csrMyCursor.eticket);
>            and !empty(csrMyCursor.noofticket) and !empty(csrMyCursor.boxno);
>            and !empty(csrMyCursor.shipno) and !empty(csrMyCursor.trans_type)
>*  SCAN REST FOR UPPER(shipno) =alltrim(thisform.text1.Value) AND  act_flag="1"
>*ENDSCAN
> brow
> ENDIF
> endif
>
>and i try as the last message, error message&&command contains unrecognized phrase/keyword
>
> "for !empty(csrMyCursor.bookno) and !empty(csrMyCursor.sticket) and !empty(csrMyCursor.eticket)"
>
>i try as under, append empty and !epmty records at my table
>
> Append from dbf('csrMyCursor') for empty(csrMyCursor.bookno) ...
>
>
>thanks
>
>>Then you must check the cursor. If ANY of the fields mentioned are blank, no records are appended. Maybe you must change the conditions. In other words, maybe "for !empty(csrMyCursor.bookno) and !empty(csrMyCursor.sticket) and !empty(csrMyCursor.eticket)" is not what you really want, then you must change it.
>>
>>>sorry,no errors, but nothing append
>>>
>>>i insert records with data, and empty records.
>>>
>>>
>>>>
>>>>Append from dbf('csrMyCursor') for !empty(csrMyCursor.bookno) and !empty(csrMyCursor.sticket);
>>>> and !empty(csrMyCursor.eticket)
>>>>
>>>>Add more fields if necessary!
>>>>
>>>>>hi,
>>>>>this is the fields.
>>>>>
>>>>>Select bookno,sticket,eticket,NOOFTICKET,BOXNO,shipno,trans_type from trans1 into cursor csrmyCursor readwrite where .F.
>>>>>SELECT csrMyCursor
>>>>>With thisform.Grid1
>>>>>  .RecordSource = "csrMyCursor"
>>>>>  .Columncount = 7
>>>>>  .Column1.ControlSource = "csrMyCursor.bookno"
>>>>>  .Column2.ControlSource = "csrMyCursor.sticket"
>>>>>  .Column3.ControlSource = "csrMyCursor.eticket"
>>>>>  .Column4.ControlSource = "csrMyCursor.noofticket"
>>>>>  .Column5.ControlSource = "csrMyCursor.boxno"
>>>>>  .Column6.ControlSource = "csrMyCursor.shipno"
>>>>>.Column7.ControlSource = "csrMyCursor.trans_type"
>>>>>    append blank
>>>>>  .Refresh()
>>>>>ENDWITH
>>>>>
>>>>>
>>>>>>I am sure that you don't have a FIELD called bookno.sticket.eticket in your csrCourse cursor???
>>>>>>
>>>>>>>hi,
>>>>>>>thank you,
>>>>>>>i try as under, but still take the empty records
>>>>>>>
>>>>>>>   Append from dbf('csrMyCursor') for !empty('csrMyCursor.bookno.sticket.eticket')
>>>>>>>
>>>>>>>
>>>>>>>thanks
>>>>>>>
>>>>>>>
>>>>>>>>Append from dbf('csrCourse') for !empty(csrCourse.somefield) && Replace somefield with a real field name!
>>>>>>>>
>>>>>>>>>hi all,
>>>>>>>>>any idea,help
>>>>>>>>>
>>>>>>>>>i need to append at my table only records not empty from my grid1(csrCourse)
>>>>>>>>>
>>>>>>>>>APPEND FROM (DBF("csrCourse"))&& only record!empty
>>>>>>>>>
>>>>>>>>>thanks
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform