Autor Beitrag
JRegier
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1268

Win XP Home, Prof, 2003 Server
D6 Enterprise
BeitragVerfasst: Mi 08.02.06 13:12 
Hallo,

eigentlich habe ich gedacht das eine Fehlermeldung kommt wenn ich
ausblenden Delphi-Quelltext
1:
2:
3:
var S : String;
... 
S := Query.FieldByName('XX').AsString; // XX ist Integer Feld


Aber es gab keine Fehlermeldung, kann man das denn so machen?

Ich benutze die Zeos Componenten.
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6395
Erhaltene Danke: 149

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Mi 08.02.06 13:29 
Ja.
JRegier Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1268

Win XP Home, Prof, 2003 Server
D6 Enterprise
BeitragVerfasst: Mi 08.02.06 14:37 
user profile iconjasocul hat folgendes geschrieben:
Ja.


Haben Sie sonst nicht's zu sagen? Kurz und knap, ja? :wink:

Vielen Dank!
mkinzler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 4106
Erhaltene Danke: 13


Delphi 2010 Pro; Delphi.Prism 2011 pro
BeitragVerfasst: Mi 08.02.06 14:44 
Zitat:
Aber es gab keine Fehlermeldung, kann man das denn so machen?

Ja, den die asX - Methoden konvertieren das Ergebnis in das angegebene Zielformat. (as = als/asInteger: als Integer)

_________________
Markus Kinzler.
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6395
Erhaltene Danke: 149

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Mi 08.02.06 15:11 
user profile iconJRegier hat folgendes geschrieben:
[Haben Sie sonst nicht's zu sagen? Kurz und knap, ja? :wink:

Deine Frage hat diese kurze Antwort einfach provoziert. Ich konnte es mir einfach nicht verkneifen. :wink:
joerg68
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 116

Win 2000
D5Enterprise
BeitragVerfasst: Fr 10.02.06 13:31 
Es gibt keine Fehlermeldung weil man jeden integer wert in einen String umwandeln kann

_________________
Aus den Chaos sprach eine Stimme " Lächele und sei froh denn es könnte schlimmer kommen". Und ich lächelte und ich war froh.
UND ES KAM SCHLIMMER