22. Januar 2008 09:34
22. Januar 2008 09:41
Jörg Nissen hat geschrieben:2. Wie kann ich auf NULL Prüfen ?
22. Januar 2008 09:46
F_NULL(VV_Feld : Integer) VV_Value : Text[120]
V_Feld_Name := '';
VV_Variant := ADO_Fields.Item(VV_Feld).Value;
IF VV_Variant.ISTEXT THEN BEGIN
IF EVALUATE(VV_Text,FORMAT(ADO_Fields.Item(VV_Feld).Value)) THEN
IF VV_Text <> '' THEN BEGIN
VV_Value := FORMAT(ADO_Fields.Item(VV_Feld).Value);
V_Feld_Name := FORMAT(ADO_Fields.Item(VV_Feld).Name);
END;
END;
IF VV_Variant.ISDATE THEN BEGIN
IF EVALUATE(VV_Date,FORMAT(ADO_Fields.Item(VV_Feld).Value)) THEN
IF VV_Date <> 0D THEN BEGIN
VV_Value := FORMAT(ADO_Fields.Item(VV_Feld).Value);
V_Feld_Name := FORMAT(ADO_Fields.Item(VV_Feld).Name);
END;
END;
IF VV_Variant.ISINTEGER THEN BEGIN
IF EVALUATE(VV_Integer,FORMAT(ADO_Fields.Item(VV_Feld).Value)) THEN
IF VV_Integer <> 0 THEN BEGIN
VV_Value := FORMAT(ADO_Fields.Item(VV_Feld).Value);
V_Feld_Name := FORMAT(ADO_Fields.Item(VV_Feld).Name);
END;
END;
IF VV_Variant.ISTIME THEN BEGIN
IF EVALUATE(VV_Time,FORMAT(ADO_Fields.Item(VV_Feld).Value)) THEN
IF VV_Time <> 0T THEN BEGIN
VV_Value := FORMAT(ADO_Fields.Item(VV_Feld).Value);
V_Feld_Name := FORMAT(ADO_Fields.Item(VV_Feld).Name);
END;
END;
CASE VV_Feld OF
2,3: BEGIN
IF VV_Variant.ISDATE THEN BEGIN
IF EVALUATE(VV_Time,FORMAT(VARIANT2TIME(VV_Variant))) THEN;
VV_Value := VV_Value + ' '+FORMAT(VV_Time);
END;
END;
END;
22. Januar 2008 09:59
Jörg Nissen hat geschrieben:1. Kann ich irgentwie die Datentyp festlegen ?
so ala ADORecSet.Fields.Item( 'Feldname' ).Value.asIntgeger ?
Variant := ADORecSet.Fields.Item('Feldname').Value;
IF Variant.ISINTEGER THEN
MESSAGE('Bla bla');
22. Januar 2008 17:05