未尾多了":"号.改为
DBSql.SQL.Add('select books.title from books inner join classes on books.classID=classes.ID where classes.title="'+key+'"');

解决方案 »

  1.   

    DBSql.SQL.Add('select books.title from books inner join classes on books.classID=classes.ID where classes.title="'+key+'"';');
    好像最后一个分号写错位置。
    不如这样:DBSql.SQL.Add('select books.title from books inner join classes on books.classID=classes.ID  AND classes.title='''+key+'''');
      

  2.   

    : hj_cn() 
    还是不行,又有了新问题,“不支持连接表达式”
      

  3.   

    : hj_cn() 
    还是不行,又有了新问题,“不支持连接表达式”
      

  4.   

    DBSql.CLOSE;
    DBSql.SQL.CLEAR;
    DBSql.SQL.Add('select books.title from books inner join classes on books.classID=classes.ID  AND classes.title='''+key+'''');
    DBSQL.OPEN;是不是这样写的呢?请检查一下