Autor Beitrag
mexx
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 1183



BeitragVerfasst: Do 03.08.06 10:33 
Ich verwende eine Query, welche in Ihrer SQL einen Parameter hat. Der Parameter wird vor dem Ausführen belegt. Nun möchte ich aber das der Parameter NULL ist. Wie kann ich das machen?


Ich hatte es damit versucht, aber keinen Erfolg!

ausblenden Delphi-Quelltext
1:
ParamByName('STATUS').IsNull;					

_________________
Das Unsympathische an den Computern ist, dass sie nur ja oder nein sagen können, aber nicht vielleicht.


Zuletzt bearbeitet von mexx am Fr 04.08.06 13:58, insgesamt 1-mal bearbeitet
alex517
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 60


D7Ent, FB, FIBPlus
BeitragVerfasst: Do 03.08.06 10:49 
Hallo mexx,

ausblenden Delphi-Quelltext
1:
ParamByName('STATUS').Clear					

alex
mexx Threadstarter
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 1183



BeitragVerfasst: Fr 04.08.06 13:59 
user profile iconalex517 hat folgendes geschrieben:
Hallo mexx,

ausblenden Delphi-Quelltext
1:
ParamByName('STATUS').Clear					

alex


Kein Erfolg...in der DB steht ein Wert. Sicherlich ein Wert, der in der While-Schleife noch vom Vorlauf war. Aber auf NULL wurde er nicht gesetzt.

_________________
Das Unsympathische an den Computern ist, dass sie nur ja oder nein sagen können, aber nicht vielleicht.
iKilledKenny
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 394
Erhaltene Danke: 8

Win XP
D5 Prof, C# Express 2005
BeitragVerfasst: Fr 04.08.06 14:30 
hi

ausblenden Delphi-Quelltext
1:
2:
Query.Parameters [0].Attributes := [psNullable];
Query.Parameters [0].Value := Null;


grüße
alex
mexx Threadstarter
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 1183



BeitragVerfasst: Fr 04.08.06 14:47 
THX, so gehts!

_________________
Das Unsympathische an den Computern ist, dass sie nur ja oder nein sagen können, aber nicht vielleicht.