Will Swain wrote:

> Hi guys,
> 
> Brain drain going on here. I am getting this error message with a 
simple
> query:
> 
>       Error Diagnostic Information
>       ODBC Error Code = 22005 (Error in assignment)
> 
>       [Microsoft][ODBC Microsoft Access Driver] Data type mismatch in 
criteria
> expression.
> 
>       SQL = "INSERT INTO tbl_test (testname, testnumber) VALUES ('will',
> 12222333444545456)"
> 
>       Data Source = "dsntest"
> 
> This is the code:
> 
>       <cfquery datasource="liquidid-payments" name="addtest">
>               INSERT INTO tbl_test
>               (testname, testnumber)
>               VALUES ('#Form.testname#', #Form.testnumber#)
>       </cfquery>
> 
> And the Access2000 db is set up as follows:
> 
> testname is a VARCHAR 510
> testnumber is a INTEGER 4
> 
> 
> I must have done hundreds of these kind of queries. They ALWAYS 
work, at
> least I'm sure they do. I've tried putting '' around the value for
> testnumber but then get an
> 
> ODBC Error Code = 22003 (Numeric value out of range)
> 
> [Microsoft][ODBC Microsoft Access Driver]Numeric value out of range 
(null)
> 
> Any ideas people??


Are you sure you have got the right error with the right query? For 
me 
entering a quoted string results in the 'data type mismatch' error 
and 
the 12222333444545456 in the 'Numeric value out of range' error. And 
the 
last one makes sense because that number is way to high to fit in an 
INTEGER 4 field.

Jochem


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to