RE: Problem with data formatting in CFINSERT
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
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
Removing bullets from textarea
Hi, I want to remove bullets and other strange characters from textarea. if the user enters the text by copying and pasting from Word, it does not display properly. On submission, the bullets and the double quotes basically turn into a ? (question mark). Did anyone ever find a solution for this? Thanks Joy ~| 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:357025 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Removing bullets from textarea
Run the entry through a REReplace and only allow characters you want in there. On Mon, Nov 4, 2013 at 1:08 PM, Joy Paulose kalappura...@hotmail.comwrote: Hi, I want to remove bullets and other strange characters from textarea. if the user enters the text by copying and pasting from Word, it does not display properly. On submission, the bullets and the double quotes basically turn into a ? (question mark). Did anyone ever find a solution for this? Thanks Joy ~| 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:357026 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Removing bullets from textarea
http://cflib.org/udf/convertSpecialChars On Mon, Nov 4, 2013 at 4:08 PM, Joy Paulose kalappura...@hotmail.comwrote: Hi, I want to remove bullets and other strange characters from textarea. if the user enters the text by copying and pasting from Word, it does not display properly. On submission, the bullets and the double quotes basically turn into a ? (question mark). Did anyone ever find a solution for this? Thanks Joy ~| 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:357027 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
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
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
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
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
Re: CFMX 10 cluster question
Hi Alex, That all makes sense. What tho about users browsing to IIS, will they URL to one or the other or both somehow via a load balancer? Regards, Carl. - On BOX1 connect IIS to the local cluster - On BOX2 connect IIS to the local cluster Does this sound correct? Is there anything I overlooked? ~| 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:357032 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm