您的位置:程序门 -> 《程序员》杂志 -> 文章评论



求助,初用delphi连接数据库时遇到的问题.


[收藏此页] [打印本页]选择字色:背景色:字体:[][][]


求助,初用delphi连接数据库时遇到的问题.
发表于:2007-09-02 11:30:54 楼主
做一个简单登陆窗体,有身份验证功能
//生成身份验证的sql语句
                sqlstr   := 'select   *   from   t_user   a,t_qxb   b   where(a.name= ' ' '+aname+ ' ' ') ';
                sqlstr   :=sqlstr   +   'and(a.password= ' ' '+apassword+ ' ' ')and(a.name=b.name) ';
                sqlstr   :=sqlstr   +   'order   by   b.cdx ';
......

运行后出现
project   project1.exe   raised   exception   class   edbengineerror   with   message   'invalid   use   of   keyword.
token:password= '111 ')and(a.name=b.name)order
linenumber:1 '.process   stopped.use   step   of   run   to   continue.
提示的没有主键值是只数据库中name的吗?我已经改过,可还是出现.什么原因.帮帮忙,谢谢.拿砖头砸我也可以.


快速检索

最新资讯
热门点击