起步软件技术论坛-X3

 找回密码
 立即注册
搜索
查看: 166|回复: 4

【搞定】NUMBER型,判断字段为空?**

[复制链接]
发表于 2007-6-12 09:22:33 | 显示全部楼层 |阅读模式
字段为NUMBER型,用什么方法判断字段为空最为严禁?
回复

使用道具 举报

发表于 2007-6-12 09:39:26 | 显示全部楼层
用 IsNull
回复 支持 反对

使用道具 举报

发表于 2007-6-12 09:44:18 | 显示全部楼层
NameSpace: Business.Data
--------------------------------------------------------------------------------
TDataField = class(Business.System.TComponent)
protected
  function AccessError(TypeName: string): EDatabaseError; virtual;
  procedure Bind(Binding: Boolean); virtual;
  procedure Change; virtual;
  procedure CheckInactive;
  procedure CopyData(Source: Business.System.TObject; Dest: Business.System.TObject); virtual;
  procedure DataChanged;
  procedure DefineProperties(Filer: Business.System.TFiler); override;
  procedure FreeBuffers; virtual;
  function GetAsBCD: TBcd; virtual;
  function GetAsBoolean: Boolean; virtual;
  function GetAsByteArray: TObject; virtual;
  function GetAsCurrency: Int64; virtual;
  function GetAsDateTime: Double; virtual;
  function GetAsFloat: Double; virtual;
  function GetAsInteger: Longint; virtual;
  function GetAsSqlTimeStamp: TSQLTimeStamp; virtual;
  function GetAsString: string; virtual;
  function GetAsVariant: TObject; virtual;
  function GetCanModify: Boolean; virtual;
  function GetClassDesc: string; virtual;
  function GetDataSize: Longint; virtual;
  function GetDefaultWidth: Longint; virtual;
  function GetFieldNo: Longint; virtual;
  function GetHasConstraints: Boolean; virtual;
  function GetIsNull: Boolean; virtual;
  function GetSize: Longint; virtual;
  procedure GetText(Text: string; DisplayText: Boolean); virtual;
  procedure Notification(AComponent: Business.System.TComponent; Operation: Business.System.TOperation); override;
  procedure PropertyChanged(LayoutAffected: Boolean);
  procedure ReadState(Reader: Business.System.TReader); override;
  procedure SetAsBCD(Value: TBcd); virtual;
  procedure SetAsBoolean(Value: Boolean); virtual;
  procedure SetAsByteArray(Value: TObject); virtual;
  procedure SetAsCurrency(Value: Int64); virtual;
  procedure SetAsDateTime(Value: Double); virtual;
  procedure SetAsFloat(Value: Double); virtual;
  procedure SetAsInteger(Value: Longint); virtual;
  procedure SetAsSQLTimeStamp(Value: TSQLTimeStamp); virtual;
  procedure SetAsString(Value: string); virtual;
  procedure SetAsVariant(Value: TObject); virtual;
  procedure SetAutoGenerateValue(Value: TAutoRefreshFlag);
  procedure SetDataSet(ADataSet: TAbstractDataSet); virtual;
  procedure SetDataType(Value: TFieldType);
  procedure SetFieldKind(Value: TFieldKind); virtual;
  procedure SetParentComponent(AParent: Business.System.TComponent); override;
  procedure SetParentField(AField: TObjectField); virtual;
  procedure SetSize(Value: Longint); virtual;
  procedure SetText(Value: string); virtual;
  procedure SetVarValue(Value: TObject); virtual;
public
  constructor create(AOwner: Business.System.TComponent);
  procedure Assign(Source: Business.System.TPersistent); override;
  procedure AssignValue(Value: Business.System.TVarRec);
  procedure Clear; virtual;
  procedure Destroy; override;
  procedure FocusControl;
  function GetData(Buffer: Business.System.TObject; NativeFormat: Boolean): Boolean;
  function GetParentComponent: Business.System.TComponent; override;
  function HasParent: Boolean; override;
  function IsValidChar(InputChar: Char): Boolean; virtual;
  procedure RefreshLookupList;
  procedure SetData(Buffer: Business.System.TObject; NativeFormat: Boolean);
  procedure SetFieldType(Value: TFieldType); virtual;
  procedure Validate(Buffer: Business.System.TObject);
  property Alignment: Business.System.TAlignment;
  property AsBCD: TBcd;
  property AsBoolean: Boolean;
  property AsCurrency: Int64;
  property AsDateTime: Double;
  property AsFloat: Double;
  property AsInteger: Longint;
  property AsSQLTimeStamp: TSQLTimeStamp;
  property AsString: string;
  property AsVariant: TObject;
  property AttributeSet: string;
  property AutoGenerateValue: TAutoRefreshFlag;
  property Calculated: Boolean;
  property CanModify: Boolean;
  property ConstraintErrorMessage: string;
  property CurValue: TObject;
  property CustomConstraint: string;
  property DataSet: TAbstractDataSet;
  property DataSize: Longint;
  property DataType: TFieldType;
  property DefaultExpression: string;
  property DisplayLabel: string;
  property DisplayName: string;
  property DisplayText: string;
  property DisplayWidth: Longint;
  property EditMask: string;
  property EditMaskPtr: string;
  property FieldKind: TFieldKind;
  property FieldName: string;
  property FieldNo: Longint;
  property FullName: string;
  property HasConstraints: Boolean;
  property ImportedConstraint: string;
  property Index: Longint;
  property IsIndexField: Boolean;
   property IsNull: Boolean;
  property KeyFields: string;
  property Lookup: Boolean;
  property LookupCache: Boolean;
  property LookupDataSet: TAbstractDataSet;
  property LookupKeyFields: string;
  property LookupList: TLookupList;
  property LookupResultField: string;
  property NewValue: TObject;
  property Offset: Longint;
  property OldValue: TObject;
  property OnChange: TFieldNotifyEvent;
  property OnGetText: TFieldGetTextEvent;
  property OnSetText: TFieldSetTextEvent;
  property OnValidate: TFieldNotifyEvent;
  property Origin: string;
  property ParentField: TObjectField;
  property ProviderFlags: TProviderFlags;
  property ReadOnly: Boolean;
  property Required: Boolean;
  property Size: Longint;
  property Text: string;
  property ValidChars: TFieldChars;
  property Value: TObject;
  property Visible: Boolean;
end;
回复 支持 反对

使用道具 举报

发表于 2007-6-13 09:56:06 | 显示全部楼层
楼主,问题搞定没有?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-6-19 14:48:25 | 显示全部楼层
搞定了,谢谢
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Justep Inc.

GMT+8, 2025-1-11 18:49 , Processed in 0.040775 second(s), 15 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表