sql.Text='select * from any where name=''hello''';

解决方案 »

  1.   

    'select * from any where name='+'''hello'''
      

  2.   

    没有出错呀
    'select * from any where name='+'''hello''' 
    'select * from any where name=''hello''' 应该都可以
    会不会是表名‘any’有问题?
      

  3.   

    sql='select * from any where name=' + #39 + 'hello'+ #39
      

  4.   

    是呀,any 是Sql中的关键字
      

  5.   

    说了n多次
    some any name之类的东西别用。
    英语不好的人从不犯此类错误!
    ^_^
      

  6.   

    是的,用any不好。是保留字吧,楼上也不用这样说嘛,难道你就很好?说几话听听?
      

  7.   

    bluetooth_2001(热情的沙漠) 你也在的啊
      

  8.   

    帮我看看http://www.csdn.net/Expert/topic/472/472477.shtm谢先
      

  9.   

    name,any不要用,另外sql的写法有问题
    应为:
    sql.clear;
    sql.add(...);