title: Problem casting field when querying spreadsheet
body: <p>I am trying to query an .xls spreadsheet with VBScript, but I have run into an issue when trying to cast a field.  <br>I connect to the spreadsheet like this.</p>
  
  <pre><code>Set objConnection = CreateObject("ADODB.Connection")
  objConnection.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &amp; DataSource &amp; ";Extended Properties=""Excel 8.0;HDR=No;"";" 
  </code></pre>
  
  <p>Then I try to query the spreadsheet.  The field I am interested in contains decimal values, but can also contain a * as a wildcard.  So what I'm trying to do is cast the field to a varchar so I can check for the *.</p>
  
  <pre><code>Set objRecordset = CreateObject("ADODB.Recordset")
  StrQuery = "SELECT * FROM [Sheet1$] WHERE F1 &gt;= 2.3456 OR CAST(F1 AS VARCHAR) = '*'"
  objRecordset.Open StrQuery, objConnection, adOpenDynamic, adLockOptimistic
  </code></pre>
  
  <p>This causes an unspecified error 80004005.  What am I doing wrong here? <br> NOTE: I also tried CONVERT, but got an Undefined Function error.</p>