title: MS Access error "ODBC--call failed. Invalid character value for cast specification (#0)"
body: <p>Does anyone have an idea what this error means or how to solve it? I am using Access 2003 and SQL2005. It comes up when trying to add a record on a particular subform. </p>
  
  <p><strong>[Microsoft][SQL Native Client] Invalid character value for cast specification (#0)</strong></p>
  
  <p><a href="http://support.microsoft.com/kb/269011" rel="noreferrer">This MS bug report</a> describes the same message, but it is a bug in SQL Server 6.5 that has already been solved.</p>
  
  <p><strong>Solved:</strong> Apparently having no PK on the destination table was causing this, it didn't have anything to do with the subform or the query from Access. <em>I wasn't even aware there were tables in this database without PK</em>. Adding PK to the destination table solved it. The strange thing is the same query string that errored when executed via SQL native client, executed through SSMS with no errors. Hope this helps anyone else who has come across that strange message.</p>