CF_SQL_INTEGER vs CF_SQL_INT

354 views
Skip to first unread message

cffaelix

unread,
Oct 26, 2005, 12:58:44 AM10/26/05
to cfaussie
Has any one noticed problems with using CF_SQL_INTEGER only to find
that if they're changed to CF_SQL_INT they work?

I looked on the macromedia livedocs site and there's no mention of
CF_SQL_INT. Yet, googling for CF_SQL_INT returns a lot of instances
where people are using it.

What's the difference, and why is it picky now that we've gone from
CFMX6.1 to CFMX7?

thanks!

Steve Onnis

unread,
Oct 26, 2005, 1:06:58 AM10/26/05
to cfau...@googlegroups.com
i use NUMERIC

allows for larger numbers

Brett Payne-Rhodes

unread,
Oct 26, 2005, 4:16:50 AM10/26/05
to cfau...@googlegroups.com
But no rounding issues when you use INTs...

B)

Steve Onnis

unread,
Oct 26, 2005, 4:56:40 AM10/26/05
to cfau...@googlegroups.com
That's got nothing to do with cf

It's the way the table is set up

Brett Payne-Rhodes

unread,
Oct 26, 2005, 5:20:37 AM10/26/05
to cfau...@googlegroups.com
Sorry Steve, I thought you refering to SQL when you mentioned 'NUMERIC'. That's not something I've ever had to use in CF...

But I think maybe it does have something to do with CF... It's the classic (10) not being equal to (9.1 + 0.9) - or something like that. Using INT (in my experience) certainly helps to alleviate that issue. Explicitly... I generally store dollar and cent values as INT (cents) in the database, dividing or multiplying by 100 when I need to display the value or put it into the database.

I find it is more reliable, your mileage may vary so feel free to flame away...

Brett
B)

Steve Onnis

unread,
Oct 26, 2005, 6:00:56 AM10/26/05
to cfau...@googlegroups.com
Why would you do that

That's what DECIMAL is for, or the MONEY column type if its available

Steve

cffaelix

unread,
Oct 26, 2005, 7:42:33 PM10/26/05
to cfaussie
Ok, let me clarify. We've been using CFMx6.1 and upgraded to CFMX7.
We always use CF_SQL_INTEGER. CF_SQL_INT is not even listed in the
cfdocs.
We use MSSQL 2000 and we use the INT type for the integer fields.
We have not come across -any- problems with this until we upgraded to
cfmx7.

So, the questions are:
What is CF_SQL_INT?
Does it exist in CFMx6.1?

We don't really want to have to change all instances of CF_SQL_INTEGER
to CF_SQL_INT just to make our code work if possible.

Reply all
Reply to author
Forward
0 new messages