English
Source / code snippets

Datensätze Individual Delete Textdatei Lines

 

Torsten
Rümker
not the most beautiful, but a working Solution.
CompileMarkSeparation
Proc Datei_einlesen

    Declare Zeile$, Zaehler&
    @Sendmessage(Filmliste&,$0184,0,0)FilmListe löschen
    Reset #1
    Let Zaehler& = 1

    Whilenot @Eof(#1)

        Input #1, Zeile$
        Datentraeger$[Zaehler&] = @Substr$(Zeile$,1,";")
        Filmname$[Zaehler&]  = @Substr$(Zeile$,2,";")
        Beschreibung$[Zaehler&] = @Substr$(Zeile$,3,";")
        @Addstring(Filmliste&,Filmname$[Zaehler&])
        Inc Zaehler&

    Endwhile

    Close #1

Endproc

Proc Datei_schreiben

    Declare Zaehler&, Zeile$
    Rewrite #1
    Let Zaehler& = 1

    Whileloop @Getcount(Filmliste&)

        Ifnot Datentraeger$[Zaehler&] = ""

            Zeile$ = Datentraeger$[Zaehler&]+";"+Filmname$[Zaehler&]+";"+Beschreibung$[Zaehler&]
            Print #1,Zeile$

        Endif

        Inc Zaehler&

    Endwhile

    Close #1

Endproc

Proc Eintrag_loeschen

    Declare Zaehler&
    Let Zaehler& = 1

    Whileloop 1000

        If @Getstring$(Filmliste&,@Getcursel(Filmliste&)) = Filmname$[&Loop]

            Let Datentraeger$[&Loop] =""

        Endif

    Endwhile

    Datei_schreiben
    Datei_einlesen

'./../../function-references/XProfan/endproc/'>Endproc


MfG
Torsten
 
Ich lerne, ob ich will oder nicht!
Betriebssystem:
- Ubuntu 15.x
- Windows (diverse)
XProfan Version: X2
11/14/05  
 



Hm moreover have so did i a idea - warscheinlich even faster:
CompileMarkSeparation
declare ltd&,s$,i&
ltd&:=100// line to del
assign #1,"fromfile.csv"
reset #1
assign #2,"tempfile.csv"
rewrite #2
i&:=0

whilenot eof(#1)

    input #1,s$
    i&+
    case (i&<>ltd&) : print #2,s$

wend

close #1
close #2
copy "tempfile.csv" > "fromfile.csv"
assign #1,"tempfile.csv"
erase #ss=s2>1

salvo, iF.
 
11/14/05  
 




Ragnar
Rehbein
another ansatz would z.b. The listview.dll of frank

one can so very slight a csv-File in a listview reinschieben.
in the LV row delete, Edit etc. (LV can too make invisible)
and subsequently again in a csv-File write.

is for sure The fastest Solution.

unfortunately not lizenzfrei.

r.r.
 
11/14/05  
 



Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

5.455 Views

Untitledvor 0 min.
RudiB.12/22/15
Torben Nissen03/02/15
Setharial02/15/13
Tommy02/01/13
More...

Themeninformationen



Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie