图书管理信息系统开发文?- 百度文库 ر

adoquery1.SQL.Clear;

adoquery1.SQL.Add('select a.*,b.*,c.* from ͼ a,ͼϢ b,Ϣ c');

adoquery1.SQL.Add('where (a.ͼ=b.ͼ)and(a.߱=c.)and(״̬=''δ'')'); adoquery1.SQL.Add('and(c. like ''%'+edit1.Text+'%'')'); adoquery1.SQL.Add('and(a.ͼ like ''%'+edit2.Text+'%'')'); adoquery1.SQL.Add('and(c. like ''%'+edit3.Text+'%'')'); adoquery1.Open;

//ѯõݸƵݱ adotable1.Clone(adoquery1,ltUnspecified); end;

procedure TbookbackF.BitBtn2Click(Sender: TObject); var

returndate:TDateTime; money:double; fine,num:string; begin inherited;

returndate:=adotable1.FieldByName('Ӧʱ').AsDateTime; num:=adotable1.FieldByName('ı').AsString; //ݿ޴

if num='' then showmessage('޴'); if (date+time-returndate)>0 then begin

//ͼ鰴ÿ0.1Ԫɷ money:=0.1*(date-returndate);

fine:= InputBox('Ѿڣ轻ɷ', 'Ӧɵķ', floattostr(money)); adocommand1.CommandText:='exec sf_ͼ黹 '+num+','+fine; end else

adocommand1.CommandText:='exec sf_ͼ黹 '+num+',0'; adocommand1.Execute; //ݿ

adoquery1.Active:=false; adoquery1.Active:=true;

adotable1.Clone(adoquery1,ltunspecified);

//עӸм̳Ĵ룬ΪǴһвѯ,ΪҪõѯ

//inherited; adoquery1.Close; adoquery1.SQL.Clear;

adoquery1.SQL.Add('select a.*,b.*,c.* from ͼ a,ͼϢ b,Ϣ c');

adoquery1.SQL.Add('where (a.ͼ=b.ͼ)and(a.߱=c.)and(״̬=''δ'')');

adoquery1.SQL.Add('and(c. like ''%'+edit1.Text+'%'')'); adoquery1.SQL.Add('and(a.ͼ like ''%'+edit2.Text+'%'')'); adoquery1.SQL.Add('and(c. like ''%'+edit3.Text+'%'')'); adoquery1.Open;

//ѯõݸƵݿ adotable1.Clone(adoquery1,ltUnspecified);