语句如下
adodc1.recordsource="select * from user where username='" & trim(text1.text) & "'"
运行时提示FROM子句语法错误
实时错误”-2147217900(80040E14)
对象REFRELSH的方法IADODC失败还有请问用了以上ADODC1。RECORDSOURCE=...后
要关闭吗,如要怎样关闭

解决方案 »

  1.   

    修改为即可,user关键字要括起来
    adodc1.recordsource="select * from [user] where username='" & trim(text1.text) & "'"
      

  2.   

    "select * from user where username='" & trim(text1.text)
    在这句中使用了关键字"user",所以会出现from子句错误,请用别的名称代替,例:"SystemUser"Adodc1.Recordset.Close
      

  3.   

    可以用rs.open "select * from user where username='" & trim(text1.text) & "'",conn,adopenstatic,adlockoptimistic
    用过之后一定要关闭,不然下次打不开:rs.close
    rs是定义的记录集,conn是打开的联接.用的是ADODB
      

  4.   

    adodc1.recordsource="select * from [user] where username='" & trim(text1.text) & "'"
      

  5.   

    差不多全了,关键字用[],用rs.open也可以实现
      

  6.   

    还是把表名"USER"改成其它的吧