title: Stored procedures with ODBC through Go/Golang
body: <p>I'm using the ODBC driver from The Brainman. I'm using the generic ODBC syntax, which is to use "CALL" to invoke a Stored Procedure. Here is my code:</p>
  
  <pre><code>stmt, stmtErr := db.Prepare("CALL RecordClick (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)")
  if stmtErr != nil {
      fmt.Printf("\nstmtErr: %s", stmtErr)
  }
  defer stmt.Close()
  
  var aclickid int
  stmtRows, stmtRowsErr := stmt.Query(xaid, subtag, r.Referer, requestUserAgent, requestIP, ip, ua, title, description, displayurl, clickUrl, kw, rpc, exid)
  if stmtRowsErr != nil {
      fmt.Printf("\nstmtRowsErr: %s", stmtRowsErr)
  }
  for stmtRows.Next() {
      stmtRows.Scan(&amp;aclickid)
  }
  </code></pre>
  
  <p>When I run this, I get the following error:</p>
  
  <pre><code>stmtRowsErr: sql: converting Exec argument #2's type: unsupported type func() string, a func
  </code></pre>
  
  <p>I really don't understand what I'm doing wrong here. I've tried it with and without curly braces around the CALL XXX (?, ?, ?) part, and it still won't work. Any ideas?</p>
  
  <p>Thanks.</p>