Autor Beitrag
SHIFTER
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 65

Win 2k SRV, Win XP, Vista, SuSe Linux SRV
Delphi 11
BeitragVerfasst: Fr 09.05.03 11:16 
Es ist eine paradox tabelle, wenn ich auslese eine feld wo es nicht drine steckt bekomme ich ein fehler :

text:=table1.fieldvalues['bezeichnung'];


so und wenn es passiert das keine bezeichnung existiert bekomme ich ein fehler.


Wie kann ich es prüfen ob das feld leer ist ?


MfG
seba
Seven
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 16



BeitragVerfasst: Fr 09.05.03 11:30 
Wenn leer == NULL ist prüf einfach im Source mit NULL

eventuell musst du NULL nachträglich einbauen in Paradox bin mir da nicht genau sicher, teste einfach ma

Sven.
foxy
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 814

Ubuntu, Gentoo
C++, PHP, Java, Ruby, Perl (Eclipse)
BeitragVerfasst: Fr 09.05.03 11:37 
also entweder machst du in deiner db oberfläsche in der spalte 0 erlaubt

oder du fragst ab

ausblenden Quelltext
1:
if table1.fieldvalues['Bezeichnung'] = '' then bla :)					


wenn null nicht erlaubt sein soll dann geh unter DBoberfläsche und setzte das auf notNull O_o nich so schwer oder ?? :D

_________________
"Only wimps use tape backup: real men just upload their important stuff on ftp, and let the rest of the world mirror it." (Linus Torvalds)
OperatingSystem Laptop (Ubuntu Hardy)
SHIFTER Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 65

Win 2k SRV, Win XP, Vista, SuSe Linux SRV
Delphi 11
BeitragVerfasst: Fr 09.05.03 11:42 
also ich bitte dich foxy.
so blöd bin ich auch nicht,
aber auch diese überprüfung liefert kein ergebnis :)

gruss
neojones
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1206
Erhaltene Danke: 1



BeitragVerfasst: Fr 09.05.03 11:49 
Machs so:

ausblenden Quelltext
1:
Table1.FieldByName('blabla').AsString					


(Ist übrigens laut Delphi-Hilfe schneller als der Zugriff mit FieldValues!)

Damit bringt er die Meldung nicht.

Viele Grüße,

Matthias

_________________
Ha! Es compiliert! Wir können ausliefern!
SHIFTER Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 65

Win 2k SRV, Win XP, Vista, SuSe Linux SRV
Delphi 11
BeitragVerfasst: Fr 09.05.03 12:03 
Titel: Hi neojones.
Es hat 100%-ig geklapt.

Besten Dank

gruss
seba