title: VBA/SQL openrecordset(strSQL) Error 3001
body: <p>I am trying to run a query on a database server (Oracle 10g) using VBA/Excel and to display the results in a excel table. I have created the ODBC connection (read-only) and tested the connection. I works fine if I import data as a data source in excel (I am able to filter through a query as well) However my VBA code is giving me Error 3001</p>
  
  <pre><code>Sub Test()
  
  Dim cnn As ADODB.Connection
  Dim canConnect As Boolean
  Dim rs As Recordset
  Dim strSQL As String
  
  Set cnn = New ADODB.Connection
  cnn.Open "DSN=blah;Uid=blah;Pwd=blah"
  
  strSQL = "select job_start_dttm, job_end_dttm from c_job"
  Set rs = cnn.openrecordset(strSQL)
  ActiveCell = rs(0)
  
  End Sub
  </code></pre>
  
  <p>I get Error 3001 - Arguemnts are of worng type, are out of acceptable range, or are in confilct with one another</p>
  
  <p>The query itself runs fine in SQL developer. Thanks</p>
  
  <p>edit: The error is on "Set rs = cnn.openrecordset(strSQL)" line</p>