RiTjForm.Query1.Close;
RiTjForm.Query1.SQL.Clear;
RiTjForm.Query1.SQL.Add('select spb.xpmc,xsb.tui,xsb.fa,xsb.yu,xsb.jg from spb,xsb');
RiTjForm.Query1.SQL.Add('where xsb.spid=spb.spid');
这个SQL语句有错吗?为什么总报 SQL error 这个错?而且说“[ODBC]{Microsoft ACCESS]驱动 参数1” 郁闷。比较弱,见笑。

解决方案 »

  1.   

    RiTjForm.Query1.SQL.Add('select spb.xpmc,xsb.tui,xsb.fa,xsb.yu,xsb.jg from xsb');
    RiTjForm.Query1.SQL.Add('left join spb on xsb.spid=spb.spid');
      

  2.   

    不行,还是出现这个错误。
    Project Project1.exe raised exception class EDBEngineError with message 'General SQL error.
    [Microsoft][ODBC Microsoft Access  驱动程序] 参数不足,期待是 1。'. Process stopped. Use Step or Run to continue.
      

  3.   

    1. 先检查你的sql语句,看有没有错. 
    2. 看看你的access数据库,是否为只读?