Re: Problem with data formatting in CFINSERT

2013-11-05 Thread Claude Schnéegans

 I have robot updaters and inserters too (made all the more robotic with the
help of cfdbinfo figuring out the field types),

This is what I do, but using my own CFX_ODBCinfo I developped years before 
cfdbinfo was available,
and I'm still using it because cfdbinfo doesn't work for Access databases.

 Debugging is miserable with a layer of
code in the middle and straightforward without.

Right, I think I'm going to improve my CF_INSERT tag by generating the SQL code 
in the tag.


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:357035
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Problem with data formatting in CFINSERT

2013-11-05 Thread Claude Schnéegans

 it could just as easy be said about frameworks

Let's say it then ;-)
The only framework I use is the one I've developped myself.
When a proble arises, I can look into it, understand it, and correct it easily.


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:357036
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Problem with data formatting in CFINSERT

2013-11-05 Thread Russ Michaels

well someone has to say it...
but why the frack are you still using MSACCESS when there are so many
better/free alternatives?
you know the Jet driver (which is what you use to connect to MSACCESS) is
no longer supported by Microsoft and ha snot been for years and only runs
in 32 bit, and as such does not work on modern 64bit OS (without lots of
hacking to get it to run in 32bit mode), which is Windows Server 2008
onwards, there is no 32 bit windows any more.



On Tue, Nov 5, 2013 at 2:44 PM,  wrote:


  I have robot updaters and inserters too (made all the more robotic with
 the
 help of cfdbinfo figuring out the field types),

 This is what I do, but using my own CFX_ODBCinfo I developped years before
 cfdbinfo was available,
 and I'm still using it because cfdbinfo doesn't work for Access databases.

  Debugging is miserable with a layer of
 code in the middle and straightforward without.

 Right, I think I'm going to improve my CF_INSERT tag by generating the SQL
 code in the tag.


 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:357037
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Problem with data formatting in CFINSERT

2013-11-05 Thread Ben

Hi Russ

For those of us who have been out of the loop for a while, can you suggest easy 
to implement alternatives to 32 bit MS access? I did a conversion of a DB to 
SQL server some years back and that was painful. 

Ben

 On Nov 5, 2013, at 7:52 AM, Russ Michaels r...@michaels.me.uk wrote:
 
 
 well someone has to say it...
 but why the frack are you still using MSACCESS when there are so many
 better/free alternatives?
 you know the Jet driver (which is what you use to connect to MSACCESS) is
 no longer supported by Microsoft and ha snot been for years and only runs
 in 32 bit, and as such does not work on modern 64bit OS (without lots of
 hacking to get it to run in 32bit mode), which is Windows Server 2008
 onwards, there is no 32 bit windows any more.
 
 
 
 On Tue, Nov 5, 2013 at 2:44 PM,  wrote:
 
 
 I have robot updaters and inserters too (made all the more robotic with
 the
 help of cfdbinfo figuring out the field types),
 
 This is what I do, but using my own CFX_ODBCinfo I developped years before
 cfdbinfo was available,
 and I'm still using it because cfdbinfo doesn't work for Access databases.
 
 Debugging is miserable with a layer of
 code in the middle and straightforward without.
 
 Right, I think I'm going to improve my CF_INSERT tag by generating the SQL
 code in the tag.
 
 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:357038
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: Problem with data formatting in CFINSERT

2013-11-05 Thread Mark A Kruger

Ben,

Moving from MS Access to MS SQL is one of the easiest options for migration
I'm afraid. 

FYI you CAN get Access running on 08r2 with CF 64bit. It just takes some
work.

-Mark

-Original Message-
From: Ben [mailto:b...@webworldinc.com] 
Sent: Tuesday, November 05, 2013 9:07 AM
To: cf-talk
Subject: Re: Problem with data formatting in CFINSERT


Hi Russ

For those of us who have been out of the loop for a while, can you suggest
easy to implement alternatives to 32 bit MS access? I did a conversion of a
DB to SQL server some years back and that was painful. 

Ben

 On Nov 5, 2013, at 7:52 AM, Russ Michaels r...@michaels.me.uk wrote:
 
 
 well someone has to say it...
 but why the frack are you still using MSACCESS when there are so many
 better/free alternatives?
 you know the Jet driver (which is what you use to connect to MSACCESS) is
 no longer supported by Microsoft and ha snot been for years and only runs
 in 32 bit, and as such does not work on modern 64bit OS (without lots of
 hacking to get it to run in 32bit mode), which is Windows Server 2008
 onwards, there is no 32 bit windows any more.
 
 
 
 On Tue, Nov 5, 2013 at 2:44 PM,  wrote:
 
 
 I have robot updaters and inserters too (made all the more robotic with
 the
 help of cfdbinfo figuring out the field types),
 
 This is what I do, but using my own CFX_ODBCinfo I developped years
before
 cfdbinfo was available,
 and I'm still using it because cfdbinfo doesn't work for Access
databases.
 
 Debugging is miserable with a layer of
 code in the middle and straightforward without.
 
 Right, I think I'm going to improve my CF_INSERT tag by generating the
SQL
 code in the tag.
 
 



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:357039
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Problem with data formatting in CFINSERT

2013-11-05 Thread Russ Michaels

Microsoft provide a free migration tool, as you are obviously on windows I
would suggest going with MSSQL and not MySQL
http://www.microsoft.com/en-gb/download/details.aspx?id=28763

the code changes are fairly minimal unless your app is huge, but if memory
serves it is mainly issues with primary keys and TEXT fields to varchar
fields you will have to deal with.


On Tue, Nov 5, 2013 at 3:06 PM, Ben b...@webworldinc.com wrote:


 Hi Russ

 For those of us who have been out of the loop for a while, can you suggest
 easy to implement alternatives to 32 bit MS access? I did a conversion of a
 DB to SQL server some years back and that was painful.

 Ben

  On Nov 5, 2013, at 7:52 AM, Russ Michaels r...@michaels.me.uk wrote:
 
 
  well someone has to say it...
  but why the frack are you still using MSACCESS when there are so many
  better/free alternatives?
  you know the Jet driver (which is what you use to connect to MSACCESS) is
  no longer supported by Microsoft and ha snot been for years and only runs
  in 32 bit, and as such does not work on modern 64bit OS (without lots of
  hacking to get it to run in 32bit mode), which is Windows Server 2008
  onwards, there is no 32 bit windows any more.
 
 
 
  On Tue, Nov 5, 2013 at 2:44 PM,  wrote:
 
 
  I have robot updaters and inserters too (made all the more robotic
 with
  the
  help of cfdbinfo figuring out the field types),
 
  This is what I do, but using my own CFX_ODBCinfo I developped years
 before
  cfdbinfo was available,
  and I'm still using it because cfdbinfo doesn't work for Access
 databases.
 
  Debugging is miserable with a layer of
  code in the middle and straightforward without.
 
  Right, I think I'm going to improve my CF_INSERT tag by generating the
 SQL
  code in the tag.
 
 

 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:357040
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Problem with data formatting in CFINSERT

2013-11-05 Thread Ben

Thanks. Their conversion utility was just close enough to be deceptive. There 
are a couple of data formats in access that don't translate worth a damn to SQL 
server. Details have faded by now. 

Thanks!

Ben

 On Nov 5, 2013, at 8:17 AM, Mark A Kruger mkru...@cfwebtools.com wrote:
 
 
 Ben,
 
 Moving from MS Access to MS SQL is one of the easiest options for migration
 I'm afraid. 
 
 FYI you CAN get Access running on 08r2 with CF 64bit. It just takes some
 work.
 
 -Mark
 
 -Original Message-
 From: Ben [mailto:b...@webworldinc.com] 
 Sent: Tuesday, November 05, 2013 9:07 AM
 To: cf-talk
 Subject: Re: Problem with data formatting in CFINSERT
 
 
 Hi Russ
 
 For those of us who have been out of the loop for a while, can you suggest
 easy to implement alternatives to 32 bit MS access? I did a conversion of a
 DB to SQL server some years back and that was painful. 
 
 Ben
 
 On Nov 5, 2013, at 7:52 AM, Russ Michaels r...@michaels.me.uk wrote:
 
 
 well someone has to say it...
 but why the frack are you still using MSACCESS when there are so many
 better/free alternatives?
 you know the Jet driver (which is what you use to connect to MSACCESS) is
 no longer supported by Microsoft and ha snot been for years and only runs
 in 32 bit, and as such does not work on modern 64bit OS (without lots of
 hacking to get it to run in 32bit mode), which is Windows Server 2008
 onwards, there is no 32 bit windows any more.
 
 
 
 On Tue, Nov 5, 2013 at 2:44 PM,  wrote:
 
 
 I have robot updaters and inserters too (made all the more robotic with
 the
 help of cfdbinfo figuring out the field types),
 
 This is what I do, but using my own CFX_ODBCinfo I developped years
 before
 cfdbinfo was available,
 and I'm still using it because cfdbinfo doesn't work for Access
 databases.
 
 Debugging is miserable with a layer of
 code in the middle and straightforward without.
 
 Right, I think I'm going to improve my CF_INSERT tag by generating the
 SQL
 code in the tag.
 
 
 
 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:357041
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Problem with data formatting in CFINSERT

2013-11-05 Thread Ben

Yep. That sounds familiar. And some of the auto incrementing features in access 
don't convert well. Perhaps a more recent conversion package version does a 
better job these days. This was about 9 years ago. 

Ben

 On Nov 5, 2013, at 8:20 AM, Russ Michaels r...@michaels.me.uk wrote:
 
 
 Microsoft provide a free migration tool, as you are obviously on windows I
 would suggest going with MSSQL and not MySQL
 http://www.microsoft.com/en-gb/download/details.aspx?id=28763
 
 the code changes are fairly minimal unless your app is huge, but if memory
 serves it is mainly issues with primary keys and TEXT fields to varchar
 fields you will have to deal with.
 
 
 On Tue, Nov 5, 2013 at 3:06 PM, Ben b...@webworldinc.com wrote:
 
 
 Hi Russ
 
 For those of us who have been out of the loop for a while, can you suggest
 easy to implement alternatives to 32 bit MS access? I did a conversion of a
 DB to SQL server some years back and that was painful.
 
 Ben
 
 On Nov 5, 2013, at 7:52 AM, Russ Michaels r...@michaels.me.uk wrote:
 
 
 well someone has to say it...
 but why the frack are you still using MSACCESS when there are so many
 better/free alternatives?
 you know the Jet driver (which is what you use to connect to MSACCESS) is
 no longer supported by Microsoft and ha snot been for years and only runs
 in 32 bit, and as such does not work on modern 64bit OS (without lots of
 hacking to get it to run in 32bit mode), which is Windows Server 2008
 onwards, there is no 32 bit windows any more.
 
 
 
 On Tue, Nov 5, 2013 at 2:44 PM,  wrote:
 
 
 I have robot updaters and inserters too (made all the more robotic
 with
 the
 help of cfdbinfo figuring out the field types),
 
 This is what I do, but using my own CFX_ODBCinfo I developped years
 before
 cfdbinfo was available,
 and I'm still using it because cfdbinfo doesn't work for Access
 databases.
 
 Debugging is miserable with a layer of
 code in the middle and straightforward without.
 
 Right, I think I'm going to improve my CF_INSERT tag by generating the
 SQL
 code in the tag.
 
 
 
 
 
 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:357042
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Problem with data formatting in CFINSERT

2013-11-05 Thread Claude Schnéegans

 FYI you CAN get Access running on 08r2 with CF 64bit. It just takes some
work.

Exact, the trick is to define the ODBC database first, then link it to CF with 
the administrator.
Once it is done, it works perfectly.


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:357044
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Problem with data formatting in CFINSERT

2013-11-05 Thread Russ Michaels

it is just delaying the inevitable.
it is just like refusing to use DVD's and trying to keep your VHS player
alive


On Tue, Nov 5, 2013 at 3:42 PM,  wrote:


  FYI you CAN get Access running on 08r2 with CF 64bit. It just takes some
 work.

 Exact, the trick is to define the ODBC database first, then link it to CF
 with the administrator.
 Once it is done, it works perfectly.


 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:357046
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Problem with data formatting in CFINSERT

2013-11-05 Thread Carl Von Stetten

If you move to MSSQL 2008 or newer, the varchar(MAX) nicely replaces the 
Access TEXT data type.  If you use the SQL Server import tools rather 
than the Access migration tools, you should be able to do identity 
insert on on auto increment columns and preserve their values.

-Carl V.
On 11/5/2013 7:27 AM, Ben wrote:
 Yep. That sounds familiar. And some of the auto incrementing features in 
 access don't convert well. Perhaps a more recent conversion package version 
 does a better job these days. This was about 9 years ago.

 Ben

 On Nov 5, 2013, at 8:20 AM, Russ Michaels r...@michaels.me.uk wrote:


 Microsoft provide a free migration tool, as you are obviously on windows I
 would suggest going with MSSQL and not MySQL
 http://www.microsoft.com/en-gb/download/details.aspx?id=28763

 the code changes are fairly minimal unless your app is huge, but if memory
 serves it is mainly issues with primary keys and TEXT fields to varchar
 fields you will have to deal with.


 On Tue, Nov 5, 2013 at 3:06 PM, Ben b...@webworldinc.com wrote:


 Hi Russ

 For those of us who have been out of the loop for a while, can you suggest
 easy to implement alternatives to 32 bit MS access? I did a conversion of a
 DB to SQL server some years back and that was painful.

 Ben

 On Nov 5, 2013, at 7:52 AM, Russ Michaels r...@michaels.me.uk wrote:


 well someone has to say it...
 but why the frack are you still using MSACCESS when there are so many
 better/free alternatives?
 you know the Jet driver (which is what you use to connect to MSACCESS) is
 no longer supported by Microsoft and ha snot been for years and only runs
 in 32 bit, and as such does not work on modern 64bit OS (without lots of
 hacking to get it to run in 32bit mode), which is Windows Server 2008
 onwards, there is no 32 bit windows any more.



 On Tue, Nov 5, 2013 at 2:44 PM,  wrote:


 I have robot updaters and inserters too (made all the more robotic
 with
 the
 help of cfdbinfo figuring out the field types),

 This is what I do, but using my own CFX_ODBCinfo I developped years
 before
 cfdbinfo was available,
 and I'm still using it because cfdbinfo doesn't work for Access
 databases.
 Debugging is miserable with a layer of
 code in the middle and straightforward without.

 Right, I think I'm going to improve my CF_INSERT tag by generating the
 SQL
 code in the tag.



 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:357048
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Problem with data formatting in CFINSERT

2013-11-05 Thread Ben

Thanks, Carl!

Ben

 On Nov 5, 2013, at 10:11 AM, Carl Von Stetten vonner.li...@vonner.net wrote:
 
 
 If you move to MSSQL 2008 or newer, the varchar(MAX) nicely replaces the 
 Access TEXT data type.  If you use the SQL Server import tools rather 
 than the Access migration tools, you should be able to do identity 
 insert on on auto increment columns and preserve their values.
 
 -Carl V.
 On 11/5/2013 7:27 AM, Ben wrote:
 Yep. That sounds familiar. And some of the auto incrementing features in 
 access don't convert well. Perhaps a more recent conversion package version 
 does a better job these days. This was about 9 years ago.
 
 Ben
 
 On Nov 5, 2013, at 8:20 AM, Russ Michaels r...@michaels.me.uk wrote:
 
 
 Microsoft provide a free migration tool, as you are obviously on windows I
 would suggest going with MSSQL and not MySQL
 http://www.microsoft.com/en-gb/download/details.aspx?id=28763
 
 the code changes are fairly minimal unless your app is huge, but if memory
 serves it is mainly issues with primary keys and TEXT fields to varchar
 fields you will have to deal with.
 
 
 On Tue, Nov 5, 2013 at 3:06 PM, Ben b...@webworldinc.com wrote:
 
 
 Hi Russ
 
 For those of us who have been out of the loop for a while, can you suggest
 easy to implement alternatives to 32 bit MS access? I did a conversion of a
 DB to SQL server some years back and that was painful.
 
 Ben
 
 On Nov 5, 2013, at 7:52 AM, Russ Michaels r...@michaels.me.uk wrote:
 
 
 well someone has to say it...
 but why the frack are you still using MSACCESS when there are so many
 better/free alternatives?
 you know the Jet driver (which is what you use to connect to MSACCESS) is
 no longer supported by Microsoft and ha snot been for years and only runs
 in 32 bit, and as such does not work on modern 64bit OS (without lots of
 hacking to get it to run in 32bit mode), which is Windows Server 2008
 onwards, there is no 32 bit windows any more.
 
 
 
 On Tue, Nov 5, 2013 at 2:44 PM,  wrote:
 
 
 I have robot updaters and inserters too (made all the more robotic
 with
 the
 help of cfdbinfo figuring out the field types),
 
 This is what I do, but using my own CFX_ODBCinfo I developped years
 before
 cfdbinfo was available,
 and I'm still using it because cfdbinfo doesn't work for Access
 databases.
 Debugging is miserable with a layer of
 code in the middle and straightforward without.
 
 Right, I think I'm going to improve my CF_INSERT tag by generating the
 SQL
 code in the tag.
 
 
 
 
 
 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:357049
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: Problem with data formatting in CFINSERT

2013-11-04 Thread David Phelan

It's been a long time since I've used Access, but if I remember correctly the 
currency data type only accepts 2 decimal places.  You need to make sure that 
the data that you are supplying only has 2 decimal places.  It is impossible to 
determine where the extra decimal places are coming from in your example as 
there is no indication of how that value is being derived.  My expectation is 
that there is some kind of calculation being performed and then assigned back 
to the form field being applied to the cfinsert.

IMHO, I would not employ the use of a cfinsert tag.  Although it makes inserts 
simpler, it removes the programmers ability to define the field data type 
expected and perform data type validation using the cfqueryparam as well as 
allowing me to apply any formatting I desire to the value that is ultimately 
submitted to the query for insertion.

David Phelan  



-Original Message-
From: =?ISO-8859-1?Q?Claude_Schn=E9egans [mailto:schneegans@interneti=71?= 
=?ISO-8859-1?Q?ue.com=3E?=] 
Sent: Sunday, November 03, 2013 9:40 PM
To: cf-talk
Subject: Problem with data formating in CFINSERT


Hi,

Weird problem this morning.
I have a CFINSERT which fails in an Access database with an error 
[Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft 
Access Driver] Data type mismatch in criteria expression. 

First, there is no criteria since it's only an insert.
Second, I get the error with a value of 57.49 in a certain field, but entering 
the valu 57.50 works perfectly!
In the error message I can see for this field:
param 18) = [type='IN', class='java.math.BigDecimal', 
value='57.49198951966012828052043914794921875', sqltype='2']

Could it be that 47 decimal is too much for a java.math.BigDecimal or an 
Access Currency column?
And if yes, who is adding all these decimals? 



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:357023
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Problem with data formatting in CFINSERT

2013-11-04 Thread Claude Schnéegans

 but if I remember correctly the currency data type only accepts 2 decimal 
 places.

I know, and my form only supplies 2 decimal places. Java adds all these 
decimals, due to floating approximation errors.
And it does not explain whay there is an error with 57.49 and not with 57.50.
Anyway, I changed the column fron Curency to floating value and the proble 
still persists.

 IMHO, I would not employ the use of a cfinsert tag.

This is what I've been dooing in about 15 years of CF programing.
IMO the worst problem with CFINSERT or CFUPDATE is that you have to supply the 
list of all form fields, a PITA.
But I designed my own CF_INSERT tag that creates this list by comparing the 
form fields and column names in the table and call CFINSERT.

 Although it makes inserts simpler, it removes the programmers ability to 
 define the field data type expected and perform data type validation using 
 the cfqueryparam

The query generated by CFINSERT does use CFQUERYPARAM, the problem seems to be 
elsewhere.
Apparently the string representing the float value with 2 decimals is first 
converted into internal float representation, then back to string in the SQL 
query with an incorrect format.



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:357024
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Problem with data formatting in CFINSERT

2013-11-04 Thread Money Pit

 IMO the worst problem with CFINSERT or CFUPDATE is that you have to
supply the list of all form fields

I'm afraid you can add to that chasing your tail for no reason thanks to
creating a semi-opaque layer between yourself and JDBC/SQL

If you use CFINSERT/CFUPDATE the above seems, sooner or later, to put you
over the edge so you swear the tool off and write SQL by hand.

I have robot updaters and inserters too (made all the more robotic with the
help of cfdbinfo figuring out the field types), but I keep them on a short
leash for the identical reason.  Debugging is miserable with a layer of
code in the middle and straightforward without.


-- 
--m@Robertson--
Janitor, The Robertson Team
mysecretbase.com


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:357028
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Problem with data formatting in CFINSERT

2013-11-04 Thread Russ Michaels

Thst is a rather hlanket statement though, it could just as easy be said
about frameworks or even cfml itself.
Not all middle tiers are restrictive.

Russ Michaels
www.michaels.me.uk
cfmldeveloper.com
cflive.net
cfsearch.com
On 5 Nov 2013 00:10, Money Pit websitema...@gmail.com wrote:


  IMO the worst problem with CFINSERT or CFUPDATE is that you have to
 supply the list of all form fields

 I'm afraid you can add to that chasing your tail for no reason thanks to
 creating a semi-opaque layer between yourself and JDBC/SQL

 If you use CFINSERT/CFUPDATE the above seems, sooner or later, to put you
 over the edge so you swear the tool off and write SQL by hand.

 I have robot updaters and inserters too (made all the more robotic with the
 help of cfdbinfo figuring out the field types), but I keep them on a short
 leash for the identical reason.  Debugging is miserable with a layer of
 code in the middle and straightforward without.


 --
 --m@Robertson--
 Janitor, The Robertson Team
 mysecretbase.com


 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:357029
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Problem with data formatting in CFINSERT

2013-11-04 Thread Money Pit

Perhaps.  Every time I flirt with cfinsert/cfupdate I learn to love them
all over again and then some stupid thing like what the OP is experiencing
ruins my afternoon and I remember why I swore them off in the first place.
When I write straight SQL I experience extra wear on my fingertips but my
blood pressure stays lower.  So I take the lesser of two evils.

I'll try and actually make a useful suggestion insofar as debugging the
OP's actual problem is concerned:  When faced with these types of errors I
have found that by writing SQL I can oftentimes find what I typed wrong in
the cfinsert statement, assuming the error was my own (for gigantic inserts
I may write code a field at a time and test at each field addition until
the code either breaks in the middle or is completed).  If not, by the time
I am done I have a replacement for the code thats throwing me off and I can
move on.


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:357030
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Problem with data formatting in CFINSERT

2013-11-04 Thread Russ Michaels

I wont disagree that CFINSERT et al should best be a avoided though, it is
pretty much a legacy tag that is there for backwards compatibility, you
certainly don't see many devs using it these days though.
It's like the Tesco value version of database tags :-)



On Tue, Nov 5, 2013 at 1:07 AM, Money Pit websitema...@gmail.com wrote:


 Perhaps.  Every time I flirt with cfinsert/cfupdate I learn to love them
 all over again and then some stupid thing like what the OP is experiencing
 ruins my afternoon and I remember why I swore them off in the first place.
 When I write straight SQL I experience extra wear on my fingertips but my
 blood pressure stays lower.  So I take the lesser of two evils.

 I'll try and actually make a useful suggestion insofar as debugging the
 OP's actual problem is concerned:  When faced with these types of errors I
 have found that by writing SQL I can oftentimes find what I typed wrong in
 the cfinsert statement, assuming the error was my own (for gigantic inserts
 I may write code a field at a time and test at each field addition until
 the code either breaks in the middle or is completed).  If not, by the time
 I am done I have a replacement for the code thats throwing me off and I can
 move on.


 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:357031
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm