procedure TForm8.DBComboBox1Change(Sender: TObject);
var
  ss:string;
begin
   DBComboBox2.ItemIndex:=DBComboBox1.ItemIndex;
   ss:= DBComboBox2.Text;
    with DM.qChapter do
    begin
      Close;
      sql.Clear;
      Sql.Add('Select ChapterID,ChapterTitle from Chapter');
      Sql.Add(' where currID='''+ss+''' order by ChapterID');
      Open;
      first;
      while not DM.qChapter.Eof DO
      begin
      DBComboBox3.Items.Add(DM.qChapter.Fieldbyname('chapterTitle').AsString);
      next;
      end;
    end;
end;这段代码有误吗?CurrID字段是int型的,列表框中选中相应教材后,再从章节表中选取所有该教材的章节。这句话应该怎么改?