类方法 stackoverflow,该怎么处理
类方法 stackoverflow
请问:
我声明了一个类,其中有对数据库的添加,删除,修改等方法。
在程序中,调用删除运行正常,调用添加和删除后,程序就死了,delphi的cpu占用率变高了。
把这两个方法的实现部分注释掉,提示stack overflow
类声明如下 //添加部分有2个子过程,
type
//员工
TEmployee = class (TObject)
private
Fid : Integer; //id
FCode : string; // 编码
FName : string; // 姓名
FDepID : Integer; //部门id
FMob : string; //移动电话
FTel : string; //电话
FEMail : string; //电子邮件
FOicq : string; //Oicq
FMSN : string; //MSN
FBal : Real; //余额
FRemark : string; //备注
FDepName : string; //部门名称
FQuery : TADOQuery;
public
procedure Setid(const Val : Integer);
procedure SetCode(const Val : string);
procedure SetName(const Val : string);
procedure SetDepID(const Val : Integer);
procedure SetMob(const Val : string);
procedure SetTel(const Val : string);
procedure SetEmail(const Val : string);
procedure SetOicq(const Val : string);
procedure SetMSN(const Val : string);
procedure SetBal(const Val : Real);
procedure SetRemark(const Val : string);
procedure SetDepName(const Val : string);
property id : Integer read Fid write Setid;
property Code : string read FCode write SetCode;
property Name : string read FName write SetName;
property DepID : Integer read FDepID write SetDepID;
property Mob : string read FMob write SetMob;
property Tel : string read FTel write SetTel;
property EMail : string read FEMail write SetEMail;
请问:
我声明了一个类,其中有对数据库的添加,删除,修改等方法。
在程序中,调用删除运行正常,调用添加和删除后,程序就死了,delphi的cpu占用率变高了。
把这两个方法的实现部分注释掉,提示stack overflow
类声明如下 //添加部分有2个子过程,
type
//员工
TEmployee = class (TObject)
private
Fid : Integer; //id
FCode : string; // 编码
FName : string; // 姓名
FDepID : Integer; //部门id
FMob : string; //移动电话
FTel : string; //电话
FEMail : string; //电子邮件
FOicq : string; //Oicq
FMSN : string; //MSN
FBal : Real; //余额
FRemark : string; //备注
FDepName : string; //部门名称
FQuery : TADOQuery;
public
procedure Setid(const Val : Integer);
procedure SetCode(const Val : string);
procedure SetName(const Val : string);
procedure SetDepID(const Val : Integer);
procedure SetMob(const Val : string);
procedure SetTel(const Val : string);
procedure SetEmail(const Val : string);
procedure SetOicq(const Val : string);
procedure SetMSN(const Val : string);
procedure SetBal(const Val : Real);
procedure SetRemark(const Val : string);
procedure SetDepName(const Val : string);
property id : Integer read Fid write Setid;
property Code : string read FCode write SetCode;
property Name : string read FName write SetName;
property DepID : Integer read FDepID write SetDepID;
property Mob : string read FMob write SetMob;
property Tel : string read FTel write SetTel;
property EMail : string read FEMail write SetEMail;