我用ADO连数据库,Provider=Microsoft.Jet.OLEDB.4.0,提示from子句出错?

解决方案 »

  1.   

    请把connectstring详细写出来看看
      

  2.   

    connectstring属性设置正确了,应该没有问题的
      

  3.   

    这个估计是语法错误,把相关的SQL语句拿到Access中查询执行一下不就知道了吗?
      

  4.   

    应该是连接后往下执行的代码有错
    比如open了ADOQuery 而ADOQuery的SQLScript有错
      

  5.   

    有可能是用了name这类的默认名,把
    你的SQL语句改成
    select * from [表名]
    可能就好了
      

  6.   

    一般是使用了adoquery它的sql没有写对。
      

  7.   

    把你的adotable属性里面的TableDirect改成True,我也遇到了同样的问题,就是这样搞定的。
    关于TableDirect的说明如下:Set TableDirect to specify whether the table is accessed simply via its name or whether a background SQL statement is used. Not all providers support accessing a table by its name and require that this access be done with a SELECT statement. If TableDirect is true the data retrieval request uses a background SQL statement and all columns are simply returned. If it is false, the TADOTable component creates a SELECT statement to retrieve the table's data. The default value of TableDirect is false.我想是不是它自己创建的select语句有些不兼容造成的。(我也是菜鸟一个,^_^)
      

  8.   

    登錄的用戶名和密碼你寫了沒有
    User ID=sa;PWD=''
      

  9.   

    如果不行的話就打補丁吧MDAC2.8和SQL2000的sp3已上的補丁
      

  10.   

    奇怪,最后我也是用了'user'这个关键字做表名,但是我用了adotable的时候就是用了上面我说的办法把数据给显示出来了.