Autor Beitrag
Silvia
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 67



BeitragVerfasst: Sa 02.04.05 12:41 
Hallo,

ich möchte auf eine Tabelle einer Accessdatenbank zugreifen und die Datensatz für Datendatz durchlaufen und als String bearbeiten!

Wie lautet der Quelltext dazu! Den Zugriff auf die Tabelle und Datenbank habe ich, ich weiß nur nicht wie ich aus dem Code heraus auf den Datensatz zugreife und einen Datensatz weiterspringe!
mikhal
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 109

Windows 10 Professional 64-Bit
VS 215 CE, Delphi 10.1 Berlin Professional
BeitragVerfasst: So 03.04.05 10:00 
Schau dir mal in der Hilfe die Methode FindField oder FieldByName von TTable bzw TQuery an, um an die Werte deines Feldes zu kommen.

Um in der Tabelle zu navigieren such in der Hilfe mal nach den Methoden First, Prior, Next und Last (ebenfalls TTable und TQuery).

Grüße
Mikhal
aussie
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 18

WIN2000
D§prof
BeitragVerfasst: Mo 04.04.05 11:37 
Hallo
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
 procedure buttonclick oder ähnliches zum starten der Prozedur 

   adoquery1.active := false;
   adoquery1.sql.clear;
   adoquery1.sql.append('select * from Table' ) 
   adoquery1.active := true;
   adoquery1.first,
   
   repeat 
   stmp := adoquery1.fields[x].asstring;   // x ist index des Feldes der Table 
                                          //oder Abfrage
   ......   // Bearbeitung des strings 


   adoquery1.next;
   until adoquery1.eof:= true;


Ich hoffe es dir weiter, das gleiche gilt auch für zugiff über BDE

Gruß Aussie

Moderiert von user profile iconraziel: Delphi-Tags hinzugefügt.
Silvia Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 67



BeitragVerfasst: Mo 04.04.05 14:07 
Ja, vielen Dank!

Ihr habt mir sehr geholfen!!