Hi, I don't know if there is some trick to this, but I'm just starting to
experiment with data integration in Flash MX 2004 Pro 7.2.
I'm using SQL Server 2000 and CFMX 7 Developer on Win XP Pro.
I went through the Ben Forta tutorial on using the Data Connection Wizard on
this site. Excellent start. However, I'm having a problem with dates on the
tutorial AND on the app I made which connects with my data on a CF App I'd
already made.
Basically, the dates come out blank on my app. On the Forta demo, they came
out blank when I had the fields defined as Date fields, but when I changed them
to STRING they started showing up.
On my app, I started with them defined as DATE, but then changed to STRING,
still they show up blank..
Any tips on this ? Note that the Forta app was using an Access DB, not sure if
that's why it at least showed the dates when set to string, which my SQL Server
based DB won't do.
Should I skip the Data Connection Wizard entirely and do it manually?
remecTim - 18 Jun 2005 00:12 GMT
Ah... I was working around this, but unfortunately the next page of my Form
Application uses one of these dates as a binding to determine what data is
displayed next. Surprise, it doesn't work.
I can't believe no one has seen this type of thing before... I've done some
searching via Google and MAcromedia's forums for help with this. Any help,
please? I'd gladly attach the FLA and CFC, but the forum won't let me.
remecTim - 22 Jun 2005 18:13 GMT
So, no one has had to use dates for querys in Flash until me?
C'mon, please help, this is holding up my project... I've searched the net and can't find an answer...
LuigiL - 23 Jun 2005 15:41 GMT
In what format (datatype) are you sending the date from cf to flash? And, did you set a formatter in the dataholder.
remecTim - 23 Jun 2005 17:38 GMT
Luigi, thanks so much for the response...
It's coming in a query datatype, and the source is SQL Server (it's a datetime
field there).
In the dataset I DID have it formatted as date, but now it's got no
formatting. I removed it to see if it made a difference, also because one of
the other date fields (not this one) was showing as "blank" in Flash when it
was formatted as a date field.
LuigiL - 23 Jun 2005 19:19 GMT
Did you explicitly specify the return type of the CFC as Date (or used the
Val() function)? (and be careful with numeric and Boolean values too) Otherwise
your data will become a string in ActionScript. Also be aware that going from
CF to ActionScript, a CF array becomes an ActionScript ordered array and a CF
structure becomes an ActionScript associative array.
remecTim - 23 Jun 2005 21:04 GMT
No, it's part of a query returntype. So does that men the whole returned query
is a string?
I was thinking about maybe adding the CFencoding the date field and the other
key I need and adding them to the query with QuerySetCell. Do you think that
would make a difference?
LuigiL - 24 Jun 2005 11:49 GMT
Yes. The returned query string comes in as a string.
Dates, Numbers and Booleans need to be explicitly set as those datatypes.
remecTim - 30 Jun 2005 17:13 GMT
OK, I'll try that, thanks
Kryss2099 - 07 Oct 2005 16:17 GMT
Yes. The returned query string comes in as a string.
Dates, Numbers and Bool"eans need to be explicitly set as those datatypes."
Sorry, would you mind explaining or pointing to a tut showing how?
Thanks
Kryss2099 - 27 Feb 2006 13:32 GMT
I've ended up solving it myself.
Thanks