在运行程序时说在关键字Load附近有语法错误,我的代码是
SQLStr:='select * from Load where id='''+Edit1.Text+''' and pwd='''+Edit2.Text+'''' ;
DM1.ADOQuery1.Close;
DM1.ADOQuery1.SQL.Clear;
dm1.ADOQuery1.SQL.Add(sqlstr);
DM1.ADOQuery1.Open;求指点
SQLStr:='select * from Load where id='''+Edit1.Text+''' and pwd='''+Edit2.Text+'''' ;
DM1.ADOQuery1.Close;
DM1.ADOQuery1.SQL.Clear;
dm1.ADOQuery1.SQL.Add(sqlstr);
DM1.ADOQuery1.Open;求指点
SQLStr:='select * from Load ......已经指出问题了
SQLStr:='select * from Load where id=' + QuotedStr(Edit1.Text) + ' and pwd=' + QuotedStr(Edit2.Text);
继续顶一下
顶顶帖子高手们
也请多多赐教
http://topic.csdn.net/u/20110709/12/3ec63017-cef8-41e0-a524-c9b9dfe56d5c.html
http://topic.csdn.net/u/20110611/12/3258c959-4f28-46b7-b5d6-46135d73036b.html
http://topic.csdn.net/u/20110722/14/89f7440b-c4d7-4c9a-a4bb-a503f5135db2.html
http://topic.csdn.net/u/20110729/10/a7bfaf06-0cf9-4580-8e91-d4e0b92066c6.htmlhttp://topic.csdn.net/u/20110811/16/e56e7cc1-d8c9-40af-92e3-c24ca103d17d.html
http://topic.csdn.net/u/20110830/13/dfae4ca5-d2b9-4889-8a3c-6f7fb61936c9.html
http://topic.csdn.net/u/20110831/17/427b6ab0-66c6-4f33-af26-ebd27b0dc541.html
http://topic.csdn.net/u/20110901/09/83c2c668-cbe6-4db9-966d-bf2f47456811.html
http://topic.csdn.net/u/20110905/12/a1161adb-8e5d-491a-b302-c9722edf2dab.html
http://topic.csdn.net/u/20110906/10/86d49517-b7a6-4fae-982b-478d2d6e2a23.html
修改原因:SQLStr为组合后的SQL语句,因此组合符合为“''''”和“+”。