P
pascaler
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TUserInfoFrm.FormCreate(Sender: TObject);
var
//执行的SQL语句
sSqlCommand : WideString;
//执行结果返回集
Vdata: OleVariant;
//循环变量
I : integer;
//CTRwebservice 接口
CTRInterface : ICTRAppFun;
sData : String;
begin
inherited;
iPowerFlag := 255;//初始状态为无
//当前窗体上的编辑框不可用
InvaildComponet(UserInfoFrm);
sSqlCommand := 'select * from CustomerInfo where CUSTOMER_TYPE=0' ;
CTRInterface := (CTRCustomerData.CustomerData.HRIOCtrWebservice as ICTRAppFun);
try
//得到用户组纪录
CTRInterface.GetUserInfoData(sSqlCommand,Vdata);
self.cdsClient.Active := false;
self.cdsClient.XMLData := VData;
//设置字段显示宽度
for i:=0 to cdsClient.FieldCount-1do
begin
dbgShowMsg.Columns.Items.Width := 70;
end;
//得到所有用户用户组
//在调用一次就出错,但在调试模式下就没有问题
sSqlCommand := 'select * from CustomerInfo';
CTRInterface.GetUserInfoData(sSqlCommand,Vdata);
self.cdstemp.Active := false;
self.cdstemp.XMLData := VData;
finally
CTRInterface := nil;
end;
end;
我们经理说的编程有问题,我不信他...让大家看看
var
//执行的SQL语句
sSqlCommand : WideString;
//执行结果返回集
Vdata: OleVariant;
//循环变量
I : integer;
//CTRwebservice 接口
CTRInterface : ICTRAppFun;
sData : String;
begin
inherited;
iPowerFlag := 255;//初始状态为无
//当前窗体上的编辑框不可用
InvaildComponet(UserInfoFrm);
sSqlCommand := 'select * from CustomerInfo where CUSTOMER_TYPE=0' ;
CTRInterface := (CTRCustomerData.CustomerData.HRIOCtrWebservice as ICTRAppFun);
try
//得到用户组纪录
CTRInterface.GetUserInfoData(sSqlCommand,Vdata);
self.cdsClient.Active := false;
self.cdsClient.XMLData := VData;
//设置字段显示宽度
for i:=0 to cdsClient.FieldCount-1do
begin
dbgShowMsg.Columns.Items.Width := 70;
end;
//得到所有用户用户组
//在调用一次就出错,但在调试模式下就没有问题
sSqlCommand := 'select * from CustomerInfo';
CTRInterface.GetUserInfoData(sSqlCommand,Vdata);
self.cdstemp.Active := false;
self.cdstemp.XMLData := VData;
finally
CTRInterface := nil;
end;
end;
我们经理说的编程有问题,我不信他...让大家看看