Ask a Question related to Coldfusion Flash Integration, Design and Development.
-
MarsupialsDo #1
CF and Flex Unexpected data type change
My apologies in advance for a long post.
I have a Flex application that talks to either a SQL Server or Oracle database
through ColdFusion. One screen has a datagrid which is bound to a query
returned by a function contained in a cfc. A number of the columns are
integers to be used as flags (0 or -1), and there are checkboxes on the screen
bound to these columns. When I call the function with a connection to SQL
Server, I receive the data in Flex with the data type I expect - string for
descriptive fields, and int for the integers. When I call the same function
with a connection to an Oracle database, all of the data is of type string.
Yes, I have confirmed that the table is defined correctly in the Oracle
database. Also, dumping the metadata of the query from CF shows that the
numeric fields are numeric, and the string fields are string; however,
examining the ResultEvent.result in the handler shows that all of the values
have been sent back to Flex as strings (performing the same check in SQL Server
reveals that the fields are of the expected data type). The end result is that
the checkboxes always appear to be checked when connected to Oracle, but the
checkboxes follow the data when connected to SQL Server.
Has anyone else seen anything like this? Am I missing something painfully
obvious?
Thanks in advance,
Leighton
<cffunction name="GetUsers" returntype="query">
<CFQUERY name="qry" datasource="#connection_string#">
SELECT 0 AS BNEW, USERID, USERNAME, USERPASSWORD, USERADMIN, USERINACTIVE,
LNAME, FNAME, SHORT_NAME, BADGE_NUMBER, EXTERNAL_ID, MOBILE_USER,
USER_GROUP_ID
FROM TBLUSER
ORDER BY USERNAME
</CFQUERY>
<cfreturn qry>
</cffunction>
<!--- BNEW, USERID, USERADMIN, USERINACTIVE, MOBILE_USER, and USER_GROUP_ID
are all defined as integer; the remainder are strings --->
MarsupialsDo Guest
-
flex chart data change events
I need to capture an event for when the data is updated in a chart. I take a snapshot of the chart and save it to a file. But when I do it via a... -
Converting from data type varchar to data type money
Hi all, Tearing my hair out trying to figure this out. If anyone can provide any help i would greatly appreciate it. When I try to do an insert... -
Converting data type varchar to data type money
Hi all, Tearing my hair out trying to figure this out. If anyone can provide any help i would greatly appreciate it. When I try to do an insert... -
#26304 [Opn->Asn]: Unexpected data loss when opening dba file
ID: 26304 Updated by: iliaa@php.net Reported By: vesely at tana dot it -Status: Open +Status: ... -
#26304 [NEW]: Unexpected data loss when opening dba file
From: vesely at tana dot it Operating system: Solaris PHP version: 4.3.4 PHP Bug Type: DBM/DBA related Bug description: ... -
MarsupialsDo #2
Re: CF and Flex Unexpected data type change
Still don't know why it is doing what it's doing, but I have a workaround for
anyone experiencing the same kind of thing.
I have changed the selected property of my check boxes to perform an explicit
coercion of the type to Boolean as follows.
Before:
selected="{lstPermitType.selectedItem.AUTO_ISSUE_T EMP}"
After:
selected="{Boolean(int(lstPermitType.selectedItem. AUTO_ISSUE_TEMP))}"
This allows the check boxes to properly display the expected value based on
the item selected in the list rather than always displaying a check (even when
the value is "0").
MarsupialsDo Guest



Reply With Quote

