Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help on Append From Command
Message
De
13/10/2017 17:49:32
 
 
À
13/10/2017 12:49:20
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 8.1
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01654964
Message ID:
01654975
Vues:
43
>Respected Sir,
>
>I have a Text file in which Data is like This
>
>
>%%Pages: 1 1
>/p { moveto 0 1 rlineto 1 0 rlineto 0 -1 rlineto fill } bind def 2 2 scale 76 116 p 77 116 p 78 116 p 79 116 p 80 116 p 81 116 p 82 116 p 87 116 p 88 116 p 90 116 p 91 116 p 92 116 p 94 116 p 95 116 p 99 116 p 101 116 p 103 116 p 106 116 p 107 116 p 110 116 p 111 116 p 112 116 p 113 116 p 114 116 p 115 116 p 116 116 p
>
>
>I am using the following commands
>
>
>Create Cursor QRcode (Targeturl Varchar(254))  && Create Temporary Cursor Qrcode 
>Append from (1.Txt )Type SDF
>
>
>But since the width of my cursor is Maxumum 254 the Data is lost and I need Data in my cursor as
>
>
>%%Pages: 1 1
>/p { moveto 0 1 rlineto 1 0 rlineto 0 -1 rlineto fill } bind def 2 2 scale 76 116 p
>77 116 p
>78 116 p
>79 116 p
>80 116 p
>81 116 p
>82 116 p
>
>
>I.e after every 'p' I need to add record. After the records will be added properly I will change the column position i.e value of 116 (Digit Just before p) to some other value as required.
>
>Kindly guide how to append records in the above case, is there any other easy less time consuming way of changing value in the string at once without appending records in cursor and going through the process of Scan-Endscan and re-writing the entire file with new values (i.e the numeric value just before every 'p')
>
>Thanks
* this part of the code is just for preparing a file like the one you're getting

LOCAL ToImport AS String

TEXT TO m.ToImport NOSHOW
%%Pages: 1 1
/p { moveto 0 1 rlineto 1 0 rlineto 0 -1 rlineto fill } bind def 2 2 scale 76 116 p 77 116 p 78 116 p 79 116 p 80 116 p 81 116 p 82 116 p 87 116 p 88 116 p 90 116 p 91 116 p 92 116 p 94 116 p 95 116 p 99 116 p 101 116 p 103 116 p 106 116 p 107 116 p 110 116 p 111 116 p 112 116 p 113 116 p 114 116 p 115 116 p 116 116 p
ENDTEXT

LOCAL FileSource AS String

m.FileSource = SYS(2023) + "~vfp" + SYS(2015) + ".eps"

STRTOFILE(m.ToImport, m.FileSource)

* now, the real import

CREATE CURSOR QRcode (Targeturl Varchar(254))

LOCAL ARRAY GetEPS(1)
LOCAL LoopIndex AS Integer

FOR m.LoopIndex = 1 TO ALINES(m.GetEPS, FILETOSTR(m.FileSource), 1 + 16, CHR(13), " p ")
	INSERT INTO QRcode VALUES (m.GetEPS(m.LoopIndex))
ENDFOR

ERASE (m.FileSource)

BROWSE
----------------------------------
António Tavares Lopes
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform