Re: [cfaussie] Odd date behaviour - CF9/SQLServer2005

2010-06-08 Thread Mike Kear
It's getting more mysterious too, Kym. I have been concentrating on one table - looking at the data in that table and the inserts into that table, and being frustrated that all the tricks and traps I've learned over more than a decade programming ColdFusion dont seem to be working. Just

Re: [cfaussie] Odd date behaviour - CF9/SQLServer2005

2010-06-08 Thread m...@ampersand.net.au
Actually what happens if you replace the cfquery tags with cfoutput - just in case there is something odd going on before the insert even happens. On 8/06/2010 3:50 PM, Kym Kovan wrote: On 8/06/2010 15:16, Mike Kear wrote: @Dale, I've just done a complete 180degree on that. Yes i think

RE: [cfaussie] Odd date behaviour - CF9/SQLServer2005

2010-06-08 Thread Steve Onnis
Mike Have you tried using the sql server profiler to inspect the queries actually being run? you can view the statement that the sql server is actually being given. if its right there then its an sql server problem. If it isn't right there then its a cf problem Steve _ From: Mike

Re: [cfaussie] Re: Odd date behaviour - CF9/SQLServer2005

2010-06-08 Thread Scott Thornton
IMO, Set Langauge seems a bit... obtuse? SET LANGUAGE DMY seems more appropriate, especially if you are giong to enter it into every sproc. cheers, Mike Kear afpwebwo...@gmail.com 08/06/2010 2:27 pm Thanks everyone for your help with this. I dont have it solved yet but i'm on the right

[cfaussie] coldfusionmeetup.com

2010-06-08 Thread Andrew Myers
Hi, I only discovered this site yesterday, and it's fantastic, especially the recordings of past sessions. Great work Charlie. I watched Dan Wilson's recording on Model Glue last night, and he appeared to use some really funky shortcuts in CFBuilder to generate stuff like cfcomponent

Re: [cfaussie] coldfusionmeetup.com

2010-06-08 Thread Mark Mandel
I'm guessing he used snippets? That is native to Builder and CFEclipse. Mark On Wed, Jun 9, 2010 at 9:43 AM, Andrew Myers am2...@gmail.com wrote: Hi, I only discovered this site yesterday, and it's fantastic, especially the recordings of past sessions. Great work Charlie. I watched Dan

Re: [cfaussie] coldfusionmeetup.com

2010-06-08 Thread Andrew Myers
Cheers Mark. But you have to configure them yourself I guess - they don't come pre-built with Builder? If I go to Window - Preferences - ColdFusion - Snippets it has a snippet path which is set to: C:\Users\andrew\Adobe ColdFusion Builder workspace\.metadata\snippets But that folder is

Re: [cfaussie] coldfusionmeetup.com

2010-06-08 Thread Mark Mandel
Yep, you have to build them yourself. There are none that come pre-packaged by default. Snippets work the same between CFEclipse and Builder, so if you can find a set for CFEclipse, you can use them in Builder. There is lots of stuff out there on snippets:

Re: [cfaussie] coldfusionmeetup.com

2010-06-08 Thread Andrew Myers
Perfect Mark. Thank you kindly. On Wed, 09 Jun 2010 10:04:19 +1000, Mark Mandel mark.man...@gmail.com wrote: Yep, you have to build them yourself. There are none that come pre-packaged by default. Snippets work the same between CFEclipse and Builder, so if you can find a set for

Re: [cfaussie] Re: Odd date behaviour - CF9/SQLServer2005

2010-06-08 Thread Mike Kear
Believe it or not, I'm still worrying away at this date issue.I dont understand ColdFusion's insistence that we have to use American dates. (This is CF9 Enterprise by the way) I create a date object, using the following: createdate(2010,10,06) which is supposed to be year, month, day in

Re: [cfaussie] Re: Odd date behaviour - CF9/SQLServer2005

2010-06-08 Thread Mike Kear
Oh jeezz. Ever had those moments when you wish you'd just taken a breath first??? Forget that.If i do it properly without the code error, i get the right result. hides his head in shame!@ Cheers Mike Kear Windsor, NSW, Australia Adobe Certified Advanced ColdFusion Developer AFP Webworks

RE: [cfaussie] Re: Odd date behaviour - CF9/SQLServer2005

2010-06-08 Thread Dale Fraser
Its working createDate(year, month, day) 2010,10,06 is 6th of October. Regards Dale Fraser http://dale.fraser.id.au http://cfmldocs.com http://cfmldocs.com/ http://learncf.com http://flexcf.com From: cfaussie@googlegroups.com [mailto:cfaus...@googlegroups.com] On Behalf Of

[cfaussie] Re: Odd date behaviour - CF9/SQLServer2005

2010-06-08 Thread Gavin Baumanis
Hi Mike, On Jun 9, 10:29 am, Mike Kear afpwebwo...@gmail.com wrote: Believe it or not, I'm still worrying away at this date issue.    I dont understand ColdFusion's insistence that we have to use American dates. (This is CF9 Enterprise by the way) I create a date object,  using the

[cfaussie] Re: Odd date behaviour - CF9/SQLServer2005

2010-06-08 Thread Gavin Baumanis
@Dale et al, Probably should have read all the emails prior to replying I guess!!! Though at least I get some assurace that I am not going crazy! And that for at least this email thread I can read properly! @Mike, Does that mean your happy with your code now? Gavin On Jun 9, 10:33 am, Dale

RE: [cfaussie] Re: Odd date behaviour - CF9/SQLServer2005

2010-06-08 Thread Steve Onnis
But thats correct isnt it? October is the 10th month _ From: Mike Kear [mailto:afpwebwo...@gmail.com] Sent: Wednesday, 9 June 2010 10:30 AM To: cfaussie@googlegroups.com Subject: Re: [cfaussie] Re: Odd date behaviour - CF9/SQLServer2005 Believe it or not, I'm still worrying away at

RE: [cfaussie] coldfusionmeetup.com

2010-06-08 Thread Steve Onnis
The annoying this though is that you cant seem to be able to assign shortcuts to your snippets like you can in HomeSite. _ From: Mark Mandel [mailto:mark.man...@gmail.com] Sent: Wednesday, 9 June 2010 10:04 AM To: cfaussie@googlegroups.com Subject: Re: [cfaussie] coldfusionmeetup.com

Re: [cfaussie] Re: Odd date behaviour - CF9/SQLServer2005

2010-06-08 Thread m...@ampersand.net.au
His problem was that when he takes that date and inserts it into SQL it goes in as 2010-06-10, but if the month was past the 12th then it goes in incorrectly, i.e. if he does 2010-12-30 he gets December 30 (correct), if he goes 2010-04-07 he gets July 4 (wrong). Personally, I still reckon

[cfaussie] Re: coldfusionmeetup.com

2010-06-08 Thread Gavin Baumanis
Hi Steve, On Jun 9, 11:02 am, Steve Onnis st...@cfcentral.com.au wrote: The annoying this though is that you cant seem to be able to assign shortcuts to your snippets like you can in HomeSite. During the beta cycle for CFBuilder I raised an E?R for allowing custom key bindings. From memory I

Re: [cfaussie] Re: Odd date behaviour - CF9/SQLServer2005

2010-06-08 Thread Mike Kear
Well i had to suck that back again and wished i could have completely obliterated my previous email. I had a mistake in the code i posted on my example earlier.But i have just found the exact scenario happening. Inside my CFCs, i think American dates are always assumed. I am setting a

Re: [cfaussie] Re: coldfusionmeetup.com

2010-06-08 Thread Mark Mandel
From memory the snippet shortcuts were a bit more powerful than shortcuts, as you could tell them to do things multiple times So doing something like: gs*2 would run that snippet twice over. Not sure if that made it into Builder though. It did work on CFEclipse. Mark On Wed, Jun 9, 2010 at

Re: [cfaussie] Re: coldfusionmeetup.com

2010-06-08 Thread Sean Corfield
On Tue, Jun 8, 2010 at 6:16 PM, Mark Mandel mark.man...@gmail.com wrote: From memory the snippet shortcuts were a bit more powerful than shortcuts, as you could tell them to do things multiple times So doing something like: gs*2 would run that snippet twice over. Not sure if that made it

RE: [cfaussie] Re: Odd date behaviour - CF9/SQLServer2005

2010-06-08 Thread Steve Onnis
do you have a return type set on the function of the cfc ? _ From: Mike Kear [mailto:afpwebwo...@gmail.com] Sent: Wednesday, 9 June 2010 11:13 AM To: cfaussie@googlegroups.com Subject: Re: [cfaussie] Re: Odd date behaviour - CF9/SQLServer2005 Well i had to suck that back again and

[cfaussie] Re: Odd date behaviour - CF9/SQLServer2005

2010-06-08 Thread Gavin Baumanis
Hi Mike I am NOT seeing your issue. Here is the code I am using; (I even changed the format slightly between the CFC and the CFM just to ensure it was dumping correctly.) dateformatter.cfm I am in the CFMbr / hr / cfset thedate = createdate(2010,06,10) cfdump var=#lsdateformat(thedate,

Re: [cfaussie] Re: Odd date behaviour - CF9/SQLServer2005

2010-06-08 Thread m...@ampersand.net.au
Is the code in the CFC doing anything obviously wrong (like formatting the date)? On 9/06/2010 11:38 AM, Gavin Baumanis wrote: Hi Mike I am NOT seeing your issue. Here is the code I am using; (I even changed the format slightly between the CFC and the CFM just to ensure it was dumping

Re: [cfaussie] coldfusionmeetup.com

2010-06-08 Thread Andrew Scott
There is also another option, in ColdFusion-Editor Profile-Editors that when a CFM / CFC is created you can use a template that suites your most used. On Wed, Jun 9, 2010 at 10:15 AM, Andrew Myers am2...@gmail.com wrote: Perfect Mark. Thank you kindly. -- You received this message because

RE: [cfaussie] coldfusionmeetup.com

2010-06-08 Thread Steve Onnis
the other cool thing in HomeSite is the Macro bit. You could use JSCRIPT to write your own macros that could be triggered with a keyboard shortcut. I wrote a coupel to insert comments and stuff like that. Was a cool feature _ From: Andrew Scott [mailto:andr...@andyscott.id.au] Sent:

Re: [cfaussie] Re: Odd date behaviour - CF9/SQLServer2005

2010-06-08 Thread Mike Kear
I have found i can specifically set a date using numerical values rather than variables, to make absolutely certain i know what the value of the date being inserted is. If i set a variable which is a date object using the createdate() function, it reads the date properly. If I use that same

Re: [cfaussie] Re: Odd date behaviour - CF9/SQLServer2005

2010-06-08 Thread Sean Corfield
What do the methods setTransDate() and getTransDate() look like? Is there a declared property behind them? If so, what does that look like? On Tue, Jun 8, 2010 at 9:02 PM, Mike Kear afpwebwo...@gmail.com wrote: I have found i can specifically set a date using numerical values rather than

Re: [cfaussie] Re: Odd date behaviour - CF9/SQLServer2005

2010-06-08 Thread Mike Kear
This is the code for the getter and setter involved: cffunction name=setTransDate access=public returntype=void output=false cfargument name=TransDate type=string required=true / cfif isDate(arguments.TransDate) cfset arguments.TransDate = dateformat(arguments.TransDate,DD/MM/) / /cfif cfset

Re: [cfaussie] Re: Odd date behaviour - CF9/SQLServer2005

2010-06-08 Thread Kym Kovan
On 9/06/2010 14:02, Mike Kear wrote: If i set a variable which is a date object using the createdate() function, it reads the date properly. If I use that same function to set a setter in a bean, it doesnt. Here's the specifics: cfset testdate = createdate(2010,06,10) pDay:

RE: [cfaussie] Re: Odd date behaviour - CF9/SQLServer2005

2010-06-08 Thread Dale Fraser
Return type String could be the problem Regards Dale Fraser http://dale.fraser.id.au http://cfmldocs.com http://cfmldocs.com/ http://learncf.com http://flexcf.com From: cfaussie@googlegroups.com [mailto:cfaus...@googlegroups.com] On Behalf Of Mike Kear Sent: Wednesday, 9 June 2010

RE: [cfaussie] Re: Odd date behaviour - CF9/SQLServer2005

2010-06-08 Thread Dale Fraser
Plus your doing a dateformat on it, its not needed, keep it as a date object in the setter Regards Dale Fraser http://dale.fraser.id.au http://cfmldocs.com http://cfmldocs.com/ http://learncf.com http://flexcf.com From: cfaussie@googlegroups.com [mailto:cfaus...@googlegroups.com]

RE: [cfaussie] Re: Odd date behaviour - CF9/SQLServer2005

2010-06-08 Thread Steve Onnis
I would have written it this way cffunction name=setTransDate access=public returntype=void output=false cfargument name=TransDate type=date required=true / cfset variables.instance.TransDate = arguments.TransDate / /cffunction cffunction name=getTransDate access=public returntype=date

Re: [cfaussie] Re: Odd date behaviour - CF9/SQLServer2005

2010-06-08 Thread Mike Kear
If I remove the date formatting stuff from the setter, it seems to work ok. But I've been using the Rooibos bean generator without problems for ages. I have never had this problem with dates before.So i'm not sure what's so different about this app. Anyway, if i do this with the

Re: [cfaussie] Re: Odd date behaviour - CF9/SQLServer2005

2010-06-08 Thread Phil Haeusler
Mike, This generated code looks like it is causing you problems. As the bean converts the date to a string for storage, when it retrieves it back CF does a String Date conversion which is something i've always seen problems with. A quick hack would be to alter the cfreturn from cfreturn

RE: [cfaussie] Re: Odd date behaviour - CF9/SQLServer2005

2010-06-08 Thread Steve Onnis
the thing is the function is messing around with the date object when it doesnt need to be. _ From: Mike Kear [mailto:afpwebwo...@gmail.com] Sent: Wednesday, 9 June 2010 2:26 PM To: cfaussie@googlegroups.com Subject: Re: [cfaussie] Re: Odd date behaviour - CF9/SQLServer2005 If I

RE: [cfaussie] Re: Odd date behaviour - CF9/SQLServer2005

2010-06-08 Thread Dale Fraser
Somewhere on that server setting the CF locale properly will fix the problem. If its an existing legacy app as you mentioned, something in the app might be playing with the locale. At least its your code and not SQL so you can fix it. Regards Dale Fraser http://dale.fraser.id.au

[cfaussie] Re: coldfusionmeetup.com

2010-06-08 Thread Andrew
I downloaded Michael Sharmans snippets from this location: http://www.chapter31.com/cfeclipse-snippets/ However the stuff in keyCombos.properties didn't seem to take effect. Is there a way to import these as well, or do I have to manually reset them all? On Jun 9, 12:25 pm, Steve Onnis

[cfaussie] The solution: Odd date behaviour - CF9/SQLServer2005

2010-06-08 Thread Mike Kear
I'm still testing, but it looks like at long last this problem is solved. For those who have been following this saga, the issue is that no matter what way I put the date into the code, it always seemed to be stored in the database in an erratic way. For dates earlier than the 13th of the month

Re: [cfaussie] Re: coldfusionmeetup.com

2010-06-08 Thread Andrew Myers
At the risk of sounding like I'm talking to myself... :-) I found the answer - I just copied over the stuff from the sharmo directory, and updated the value accordingly and it's all good now. Sweeet On Wed, 09 Jun 2010 15:18:50 +1000, Andrew am2...@gmail.com wrote: I downloaded