Thema: Delphi Problem mit sql abfrage

Einzelnen Beitrag anzeigen

Fridolin

Registriert seit: 8. Jan 2007
71 Beiträge
 
Delphi 2006 Architect
 
#11

Re: Problem mit sql abfrage

  Alt 12. Jun 2007, 11:05
Delphi-Quellcode:
  myquery1.SQL.text:=('select ant_id from anhaengertypen where anhaengertyp = '''+typ+'''');
  myquery1.Execute;
  typid:=myquery1.Fields[0].AsString;

  myquery1.SQL.text:=('select ang_id from angg where angesamtgewicht = '''+gg+'''');
  myquery1.Execute;
  ggid:=myquery1.Fields[0].AsString;

  myquery1.SQL.text:=('select anv_id from anvolumina where anvolumen = '''+vol+'''');
  myquery1.Execute;
  volid:=myquery1.Fields[0].AsString;

  myquery1.SQL.Text:=('select anr_id from anradstaende where anradstand = '''+rad+'''');
  myquery1.Execute;
  radid:=myquery1.Fields[0].AsString;

  myquery1.SQL.Text:=('select anrs_id from anrschraenke where anrschrank = '''+rschr+'''');
  myquery1.Execute;
  rschrid:=myquery1.Fields[0].AsString;

  myquery1.SQL.Text:=('select anus_id from anuschraenke where anuschrank = '''+uschr+'''');
  myquery1.Execute;
  uschrid:=myquery1.Fields[0].AsString;

  myquery1.SQL.Text:=('select bid from anbezeichnungen where ant_id = '''+typid+''' and ang_id = '''+ggid+''' and anv_id = '''+volid+''' and anr_id = '''+radid+''' and anrs_id = '''+rschrid+''' and anus_id = '''+uschrid+'''');
  myquery1.Execute;
  bezid:=myquery1.fields[0].asstring;

  myquery2.SQL.Text:=('select andocname,anpdfname from anzt a join andocblob d on d.andb_id = a.andb_id join anpdfblob p on p.anpb_id = a.anpb_id where a.bid = :bezid');
  myquery2.Execute;
  Mit Zitat antworten Zitat