Autor Beitrag
Matthias-K
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 271

Win95, Win98, Win2000, WinXP, Linux
D2, D4 Client/Server, D5 Enterprise, D6 Enterprise, D7 Enterprise, Delphi2005, C/C++ 3.0, C/C ++ 5.0, C/C++ 6.0
BeitragVerfasst: Do 05.01.06 11:29 
hi,

folgendes problem:

ich mache ein select auf eine tabelle. dann prüfe ich, ob die abfrage leer ist. ist sie nicht.

dann will ich mir die feldwerte holen. über fieldbyname. dort findet er allerdings keine werte!

ich hab das select statement extern in einem programm getestet. es liefert mir einen ds zurück.

doch in meinem programm verliert er einige werte! das letzte feld wiederum bekommt er!

woran kann das begründet sein?

matthias

_________________
Ein Spezialist ist ein Mensch, der immer mehr von immer weniger weis, bis er alles von nichts weis!
Danny87
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 688

Windows 10 Pro 64bit
Sprachen: HTML, PHP, JavaScript, Delphi || IDE: RAD Studio 10.1 Berlin Starter, WeBuilder
BeitragVerfasst: Do 05.01.06 11:30 
wie genau benutzt du das fieldbyname?
ein bisschen code wäre hilfreich.
Matthias-K Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 271

Win95, Win98, Win2000, WinXP, Linux
D2, D4 Client/Server, D5 Enterprise, D6 Enterprise, D7 Enterprise, Delphi2005, C/C++ 3.0, C/C ++ 5.0, C/C++ 6.0
BeitragVerfasst: Do 05.01.06 11:41 
wie benutzt man wohl ein fieldbyname??? *ggg*
ausblenden Delphi-Quelltext
1:
2:
3:
4:
wert1  := DataModul.Daten.fieldbyname('feld1').asstring;
wert2  := DataModul.Daten.fieldbyname('feld2').asstring;
wert3    := DataModul.Daten.fieldbyname('feld3').asstring;
wert4    := DataModul.Daten.fieldbyname('feld4').asstring;

so, das externe selct ergibt einen ds, sagen wir mal ungefähr so:

aaaa, bbbb, cccc, dddd

(repräsentativ für die feldwerte) so,
wert1 = ''
wert2 = ''
wert3 = ''
wert4 = 'dddd'

so! aber wieso bekommt er die ersten 3 werte nicht hin???

matthias

_________________
Ein Spezialist ist ein Mensch, der immer mehr von immer weniger weis, bis er alles von nichts weis!
mkinzler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 4106
Erhaltene Danke: 13


Delphi 2010 Pro; Delphi.Prism 2011 pro
BeitragVerfasst: Do 05.01.06 11:50 
Stimmt die Schreibweise der Feldenamen ( feld1, ...) und stimmt auch der Feldtyp ( string?).

_________________
Markus Kinzler.
Matthias-K Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 271

Win95, Win98, Win2000, WinXP, Linux
D2, D4 Client/Server, D5 Enterprise, D6 Enterprise, D7 Enterprise, Delphi2005, C/C++ 3.0, C/C ++ 5.0, C/C++ 6.0
BeitragVerfasst: Do 05.01.06 14:42 
nein, die schreibweise hat auch gestimmt!

was allerdings nicht funktioniert hat, war das boolsche flag, was ich gesetzt hatte!

trotzdem danke!

_________________
Ein Spezialist ist ein Mensch, der immer mehr von immer weniger weis, bis er alles von nichts weis!