Q&A

  • ClientDataSet에 대해서문의
다름이 아니라 FieldValues를 두번째부터 불러올때 에러 나는 경우는 어떻하죠..

DM := TDM.Create(nil);

if sMode = 'sukang' then

begin

DM.ITClientSet.Close;

DM.ITClientSet.CommandText := 'select attend_start, unit_num, epit_num,attend_type from vi_unit where offer_unit_num=' +

sOfferUnit;

DM.ITClientSet.Open;

if not DM.ITClientSet.Eof then

begin

Attend_Start := DM.ITClientSet.FieldValues['attend_start'];

unit_num := DM.ITClientSet.FieldValues['unit_num']; <- 여기부터 에러가납니다.

Attend_Type := DM.ITClientSet.FieldValues['Attend_Type'];

Epit_num := DM.ITClientSet.FieldValues['Epit_num'];

end;



if Attend_Type = '1' then

begin

Attend_date := DateToStr(inDate);

delete(attend_date,5,1);

delete(attend_date,7,1);

ITsql := 'update offer_unit Set ' + ' attend_date=' + attend_date +

' attend_ance + attend_ance + 1' + ' where offer_unit_num=' + sOfferUnit;

DM.ITClientSet.Close;

DM.ITClientSet.CommandText := ITsql;

DM.ITClientSet.Execute;

end

else

begin

Attend_date := DateToStr(inDate);

delete(attend_date,5,1);

delete(attend_date,7,1);

ITsql := 'update offer_unit Set ' + 'attend_type =1' + ' attend_start=' + attend_date +

' attend_date=' + attend_date + ' attend_ance + attend_ance + 1' +

' where offer_unit_num=' + sOfferUnit;

DM.ITClientSet.Close;

DM.ITClientSet.CommandText := ITsql;

DM.ITClientSet.Execute;

end;

DM.Free;

0  COMMENTS