本帖最后由 sdjmu 于 2010-05-27 14:04:35 编辑

解决方案 »

  1.   

    看错,是不是内容改了。刚才看好像没看到Admin.SELECT *
    FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0','d:\GDDB.mdb';'Admin';'G890EFG',RyInfos)这句语法是对的。
      

  2.   

    --你换一种方式试一下,看什么提示:
    SELECT *
    FROM OPENDATASOURCE ('Microsoft.Jet.OLEDB.4.0', 
          'Data Source="d:\GDDB.mdb";User ID=Admin;Password=G890EFG' )...表名
      

  3.   

    SELECT * FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0','f:\acc_test.mdb';'Admin';'',t1)试不出你的问题,我也是express
      

  4.   


    你好,试了一下,错误一样
    SQLSERVER开发版一样通过
      

  5.   

    你好,我是WINDOWS认证登录,不知道你是不是
      

  6.   

    这种基本的查询跟SQL Server 的版本是没有大差别的。主要是语句的原因吧。楼主再看看吧。
      

  7.   

    刚找出问题了
    就是WINDOWS认证登录的问题
    用SQL认证登录没有问题
    奇怪的是开发版和企业版都没有这个问题(无论什么登录模式)
    下面是微软有关部门发布的,大家看一下:
    Dear customer,Thanks for reporting this issue to us. This is a design limitation in the way the Jet OLE DB provider works within SQL Server.When you connect using Windows authentication, SQL Server impersonates your Windows account while loading the provider. This is necessary because the account SQL Server is running under -- Network Service, in your case -- may not have the necessary permissions to open the files you ask it to. (Network Service is an account with minimum privileges on the local computer). When you connect using SQL authentication, the provider is loaded without impersonation, so it can only access files accessible by Network Service.Jet creates temp files while running, and it does so in the directory pointed to by environment variables %TEMP% or %TMP%. Since Jet is typically loaded in-process within SQL, it shares SQL's environment variables, so it tries to create these temp files in C:\Documents and Settings\NetworkService\Local Settings\Temp, which your Windows account cannot access, by default. Unfortunately there's no approach that would cover all situations: When SQL impersonates (Windows authentication), your Windows account has to have access to Network Service's %TEMP% directory. When SQL does not impersonate (SQL authentication), then you need to give Network Service access to your files.There is a KB article about this issue at http://support.microsoft.com/kb/814398. There is also a more recent (and very detailed) blog post at http://blogs.msdn.com/spike/archive/2008/07/23/ole-db-provider-microsoft-jet-oledb-4-0-for-linked-server-null-returned-message-unspecified-error.aspx that describes the various Jet-SQL error messages and explains a couple of workarounds for this problem (giving your windows account access to Network Service's %TEMP%, or changing Network Service's %TEMP% to point to a shared directory).Best regards,
    Vassilis Papadimos
    SQL Server development