Autor Beitrag
michaelb31
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 24



BeitragVerfasst: Do 30.12.04 09:13 
Hallo Leute,
habe in Problem hoffe ihr könnt mir helfen!!
Habe eine Textdatei mit z.B. folgendem Inhalt :

0512581345454587545458454545475874
2124454554894545454545454987988997
3565756419945647987545486253654965

nun möchte ich diese Datei in eine ADO Tabelle Schreiben und trennen das heißt
an stelle 1-2 steht NR1
an stelle 3-6 steht NR2
an stelle 7-9 steht NR3 usw.

wie kann ich jetzt diese Datei zeilenweise einlesen und in die Tabelle schreiben :?:

Danke jetzt schon :lol:
rochus
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 416

Win XP Prof, Fedora Core 4, SuSE 7.0
D7 Ent, D2005 Pers
BeitragVerfasst: Do 30.12.04 10:00 
du kannst die datei öffnen, dann per readln immer eine zeile in einen string einlesen und dann sagen die jeweiligen teile in einzelne strings kopieren, die wiederum in zahlen und dann über nen SQL in die ado tabelle schreiben :)

_________________
Im Nachhinein ist man immer ein Schlauch!
"Dream as if you'll live forever, live as if you'll die today!" James Dean
michaelb31 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 24



BeitragVerfasst: Do 30.12.04 11:09 
und wie genau :?:
bin leider kein Profi
rochus
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 416

Win XP Prof, Fedora Core 4, SuSE 7.0
D7 Ent, D2005 Pers
BeitragVerfasst: Do 30.12.04 11:32 
schlag mal in der delphi hilfe die folgenden funktionen nach:

- assignfile
- readln
- copy
- strtoint

_________________
Im Nachhinein ist man immer ein Schlauch!
"Dream as if you'll live forever, live as if you'll die today!" James Dean
Tino
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Veteran
Beiträge: 9839
Erhaltene Danke: 45

Windows 8.1
Delphi XE4
BeitragVerfasst: Do 30.12.04 11:58 
Hallo!

Schau dir mal dieses Topic an... dort wird fast genau das gleiche gemacht.

www.delphi-forum.de/....php?p=202539#202539

Gruß
Tino
michaelb31 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 24



BeitragVerfasst: Do 30.12.04 13:14 
Besten Dank :lol: