IN SQL, the INT datatype supports numbers up to: 2,147,483,647 and -
2,147,483,647
Your number exceeds the maximum allowable limit for that datatype:
12,222,333,444,545,456
In SQL, you would use the field type to BINARY and set the field
length to
whatever you think the max number of numbers could be. In MS Access,
you
would set the field type to Number, with the attribute of Double.
When you output the number with CF, be sure to use the NumberFormat
mask (or
a similar mask), otherwise the number would appear as follows:
1.22223334445455E+16
---mark
=========================================
Mark Warrick - Fusioneers.com
Personal Email: [EMAIL PROTECTED]
Business Email: [EMAIL PROTECTED]
Phone: 714-547-5386
Efax: 801-730-7289
Personal URL: http://www.warrick.net
Business URL: http://www.fusioneers.com
ICQ: 125160 / AIM: markwarric
=========================================
-----Original Message-----
From: Will Swain [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 19, 2001 3:25 AM
To: CF-Talk
Subject: cross-posting: data type mismatch
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??
Will Swain
Hot Horse Ltd
http://www.hothorse.com
e: [EMAIL PROTECTED]
t: 01273 675375
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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