Earlier today, I was working on a project that was using an MS Access Database (sexy, I know!) when one of the queries starting throwing this error:
[Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft]
[ODBC Microsoft Access Driver]Invalid precision value
When I went to look at the query, which was just storing FORM data, I noticed that all of the data types in my ColdFusion CFQueryParam tags were set to CF_SQL_VARCHAR. Thanks to some advice I received months ago from fellow ColdFusion programmer, Spencer Strickland, I knew exactly what the problem was. In Microsoft SQL Server, which is what I am accustomed to, CF_SQL_VARCHAR will work for any kind of text field; however, in MS Access, CF_SQL_VARCHAR will not work with fields of data-type, Memo. For some reason, and I guess this is a driver issue, Memo fields require a CFQueryParam of sql type, CF_SQL_LONGVARCHAR.
Minor issue, but a huge ass pain if you didn't know what to look for.
Comments (3) | Post Comment | Ask Ben | Permalink | Other Searches | Print Page
Generic Form Processing / Emailing In ColdFusion
Hal Helms Teaches Me Some Object Oriented Programming
Thank you for this one. I was very close to desperation.
Posted by sz on Apr 21, 2008 at 3:02 PM
@Sz,
Glad to have helped.
Posted by Ben Nadel on Apr 21, 2008 at 3:27 PM
Thank you thank you! This has been driving me nuts for a while!
Posted by Sal V on Dec 4, 2008 at 3:27 PM