Autor Beitrag
Blacked
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 30



BeitragVerfasst: Mo 27.06.05 09:15 
Hallo,

ich habe folgendes Problem:

Ich möchte gerne DATEN sagen wir aus Zeile 1 Spalte 4 Auslesen und oder sogar ändern.

z.B. Wenn ich in Zeile 1 Spalte 1 eine "5" finde soll er mir in Zeile 1 Spalte 5 automatisch einen Wert (String) eintragen...

Mein Problem liegt also nur darin wie ich das Aulesen und eintragen realisiere...
Habe es schon über Table.Fields[3].AsString versucht aber da lassen sich ja nur die Spalten auslesen aber leider nicht zuweisen...

Ich hoffe Ihr könnt mir weiterhelfen...

Danke.

Gruß

_________________
Modern programming is a race between the programmer striving to build bigger and better idiotproof programs and the Universe trying to build bigger and better idiots.
So far the Universe is winning.
direction4delphi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 84

WIN 95, WIN 98, WIN ME, WIN NT, WIN 2000, WIN XP, VISTA
D2 Prof, D4 Prof,D2005 Prof, Delphi4Php
BeitragVerfasst: Di 28.06.05 09:10 
Du kannst werte zuweisen wenn du:
ausblenden Delphi-Quelltext
1:
2:
3:
Tabelle.edit;
Tabelle['feld']:='mein string';
Tabelle.post;

verwendest
OlliWausD
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 212

Win 2000/XP
Delphi 5 Professional - Interbase/Firebird
BeitragVerfasst: Di 28.06.05 10:55 
user profile icondirection4delphi hat folgendes geschrieben:
Du kannst werte zuweisen wenn du:
ausblenden Delphi-Quelltext
1:
2:
3:
Tabelle.edit;
Tabelle['feld']:='mein string';
Tabelle.post;

verwendest


da fehlt aber des "fields" :wink: (*klugscheis*) :roll:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
zahl := dbgrid1.columns[0].asinteger
Tabelle.edit;
Tabelle.fields[zahl].asstring :='mein string';
Tabelle.post;

_________________
Take it easy
direction4delphi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 84

WIN 95, WIN 98, WIN ME, WIN NT, WIN 2000, WIN XP, VISTA
D2 Prof, D4 Prof,D2005 Prof, Delphi4Php
BeitragVerfasst: Di 28.06.05 11:00 
Nein fehlt nicht

Versuch den obigen Quellcode in Delphi wirst sehen der geht :lol:

Vereinfacht den Zugriff ungemein

mfg
MILLI
OlliWausD
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 212

Win 2000/XP
Delphi 5 Professional - Interbase/Firebird
BeitragVerfasst: Di 28.06.05 11:02 
user profile icondirection4delphi hat folgendes geschrieben:
Nein fehlt nicht

Versuch den obigen Quellcode in Delphi wirst sehen der geht :lol:

Vereinfacht den Zugriff ungemein

mfg
MILLI


woar, mom. des test ich jetzt gleich mal

EDIT:
jep, funktioniert. schöne kurze schreibweise. mein Ego schreibt da aber trotzdem lieber den asTyp mit hinzu. ;-)

_________________
Take it easy
Blacked Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 30



BeitragVerfasst: Do 30.06.05 13:22 
Hey Jungs,

hat prima gefunzt! :-)

Allerdings hab ich jetzt ein neues Problem, bei dem ihr sicherlich eine Antwort wisst.

Und zwar versuche ich über Table1.FindKey einen Datensatz zu suchen, bzw. einen Wert.
Dabei bekomme ich die meldung "Es ist kein Index aktiv"

Weiss jemand was damit gemeint ist?!

Danke. :?

_________________
Modern programming is a race between the programmer striving to build bigger and better idiotproof programs and the Universe trying to build bigger and better idiots.
So far the Universe is winning.
direction4delphi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 84

WIN 95, WIN 98, WIN ME, WIN NT, WIN 2000, WIN XP, VISTA
D2 Prof, D4 Prof,D2005 Prof, Delphi4Php
BeitragVerfasst: Do 30.06.05 15:13 
user profile iconBlacked hat folgendes geschrieben:
Hey Jungs,

hat prima gefunzt! :-)

Allerdings hab ich jetzt ein neues Problem, bei dem ihr sicherlich eine Antwort wisst.

Und zwar versuche ich über Table1.FindKey einen Datensatz zu suchen, bzw. einen Wert.
Dabei bekomme ich die meldung "Es ist kein Index aktiv"

Weiss jemand was damit gemeint ist?!

Danke. :?


Wenn es sich um eine einfache Suche handelt schau dir mal Table1.filter an

mfg
MILLI
Blacked Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 30



BeitragVerfasst: Mo 04.07.05 07:37 
Nein ich bräuchte halt genau diese Funktion... weil dann der entsprechende gefundene Datensatz makiert wird... dann brauch ich nur noch mein FELD makieren das ich haben will und gut ist... also hat jemand ne Idee was es mit diesem nicht Aktiven Index auf sich hat?!

:?:

_________________
Modern programming is a race between the programmer striving to build bigger and better idiotproof programs and the Universe trying to build bigger and better idiots.
So far the Universe is winning.