Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Append from grid
Message
De
07/03/2006 07:18:03
 
 
À
07/03/2006 07:04:27
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9
Database:
Visual FoxPro
Divers
Thread ID:
01101962
Message ID:
01102013
Vues:
29
hi,
thank you very much for a grate help ,it works as
 Append from dbf('csrMyCursor') for !empty(bookno) or !empty(sticket)  OR !empty(eticket)
thanks again.

best regards.

>
>Append from dbf('csrMyCursor') for !empty('csrMyCursor.bookno.sticket.eticket') && My ild line, does not work!
>Append from dbf('csrMyCursor') for !empty(csrMyCursor.bookno) && My new, modified line!
>Is this small change really so difficult to figure out for yourself???
>
>>HI,
>>OK, I WANT TO CHICK ONLY IF !empty(csrMyCursor.bookno)&&CHAR TYPE
>>MAKE APPEND NEW RECORD? THIS WHAT I WANT ONLY
>>
>>I TRY IF csrMyCursor.bookno>SPACE""
>>APPEND....NOT WORK
>>
>>THANKS.
>>
>>
>>>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform