Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Inserting a Insert Blank at Begining of File
Message
De
14/09/2013 05:12:58
 
 
À
14/09/2013 04:58:22
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01583256
Message ID:
01583261
Vues:
37
Sorry, I didn't got/understood what you said. Please Explain in detail.
I need to insert a Blank record if my Data is matched during scan & Endscan. The code Which I have shown below does not work if the Matching record is found on record number 1 itself, as Skip-1 does not work here.

Is there any other way, please Guide in detail




>That's not a good idea, for many reasons. Instead you add a numeric column which keeps track of the line number.
>
>>I am Using the following code to Insert a Record. However, if the original record is at the Begnining of File i.e if RECNO()=1, I am not able to insert a Blank record before my original record.
>>
>>Thus if my STREXTRACT(PS,'(',')')='Usage Charges' AND LEFT(PS,1)='F' is found at the begin of File I need to insert one Blank record before it.
>>
>>
>>
>>Go top
>>Scan
>>IF STREXTRACT(PS,'(',')')='Usage Charges' AND LEFT(PS,1)='F'
>>NEWPS='N '+ALLTRIM(STR(posC-2))+' '+ALLTRIM(STR(posR+7))+' '+ALLTRIM(STR(m.BoxEndcolumn-posC))+' '+'-8 i'
>>Skip-1 && Pointer Skips one record above 
>>INSERT BLANK
>>Replace PS With NEWPS
>>Skip Pointer comes Back to Orignal Position
>>ELSE
>>ENDIF
>>ENDSCAN				
>>
>>
>>
>>Kindly Guide
>F
Harsh
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform