title: System.Data.OleDb.OleDbException: Unspecified error - Only on some machines
body: <p>I have a .NET framework 3.5 application that connects via OleDb to a SQL Server 2000 database. Everything was working fine, but now only some users are getting this error:</p>
  
  <blockquote>
    <p>Message: Unspecified error<br>
    System.Data.OleDb.OleDbException: Unspecified error<br>
    at System.Data.OleDb.OleDbDataReader.ProcessResults(OleDbHResult hr)<br>
    at System.Data.OleDb.OleDbDataReader.GetRowHandles()<br>
    at System.Data.OleDb.OleDbDataReader.ReadRowset()<br>
    at System.Data.OleDb.OleDbDataReader.Read()<br>
    at System.Data.OleDb.OleDbDataReader.HasRowsRead()<br>
    at System.Data.OleDb.OleDbDataReader.NextResult()<br>
    at System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior
    behavior, String method)<br>
    at System.Data.OleDb.OleDbCommand.ExecuteReader(CommandBehavior behavior)
    at System.Data.OleDb.OleDbCommand.ExecuteReader()<br>
    at Comafi.PymeBC.Webdav.Hibernate.Module.DataBaseConnection.GetData(String
    texto, CommandType tipo) in C:\Devel\ComafiEmpresas\src\ComafiEmpresas\Comafi.PymeBC.Webdav3\Comafi.PymeBC.Webdav.Hibernate.Module\DataBaseConnection.cs:line 48<br>
    at Comafi.PymeBC.Webdav.Hibernate.Module.DbFile.GetUniqueFile(String
    urlPath) in</p>
  </blockquote>
  
  <p>Here's my connection string</p>
  
  <pre><code>&lt;add name="Webdav" 
       connectionString="Provider = SQLOLEDB.1;Data Source=DataBaseSource;Initial Catalog=DataBaseName;User Id=User;Password=SomePassword;" 
       providerName="System.Data.SqlClient"/&gt;
  </code></pre>
  
  <p>Here's my code. <strong>The line that throws the error is "comando.ExecuteReader()"</strong></p>
  
  <pre><code>public static OleDbConnection GetConnection()
  {
      try
      {
          if (conn.State == ConnectionState.Closed)
          {
              System.Configuration.ConnectionStringSettingsCollection Constrings = System.Configuration.ConfigurationManager.ConnectionStrings;
              System.Configuration.ConnectionStringSettings Constring = Constrings["Webdav"];
  
              conn.ConnectionString = Constring.ConnectionString;
              conn.Open();
          }
  
          return conn;
      }
      catch (Exception ex)
      {
          throw ex;
      }
  }
  
  public static OleDbDataReader GetData(string texto, CommandType tipo)
  {
      var comando = new OleDbCommand
                        {
                            Connection = GetConnection(),
                            CommandText = texto,
                            CommandType = tipo,
                        };
  
      return comando.ExecuteReader();
  }
  
  public static DbFile GetUniqueFile(string urlPath)
          {
              ...
  
              var data = GetData(....);
  
              if (data.HasRows)
              {
                  data.Read();
                      var file = DbFile.GetObject(data);
                  data.Close();
                  return file;
              }
  
              return null;
          }
  </code></pre>
  
  <p>I read a lot of posts about this but none pointed me to the right direction.</p>