I'm trying to compare a username entered in flash to the username in a
database.
If I have the coldfusion document set-up to take a param "userID" as a numeric
it works fine with flash. If I change it to accept a string and compare it to a
different column in the database that is text, I receive an error. Here is my
code, can anyone tell me why this is happening? Comparing numbers fine but not
strings or text.
CF CODE:
<cffunction name="getUserDetails" access="remote" returnType="query"
output="true">
<cfargument name="userID" type="string" required="true">
<cfquery name="userDetailQuery" datasource="testDataBase">
SELECT * FROM users WHERE FIRSTNAME = #userID#
</cfquery>
<cfreturn userDetailQuery >
</cffunction>
FLASH CODE:
function getTestConn_Result(re:ResultEvent) {
//trace(re.result);
connStatus.text = re.result;
//Call the Products component
var userID:String = "Carey";
getUserDetails(userID);
}
//Handel the Failure
function getTestConn_Fault(fault:FaultEvent):Void {
trace("error");
}
//Get the Product Details
function getUserDetails(userID) {
var userDetails_pc:PendingCall = unleashedService.getUserDetails(userID);
userDetails_pc.responder = new RelayResponder(this, "getUserDetails_Result",
"getUserDetails_Fault");
}
My database has a column set up in it that is called "FIRSTNAME"... Please
help... Thank-you
jag57 - 28 Apr 2006 21:14 GMT
Could you tell us the exact error that occurs?
Have you tried using the NetConnection Debugger?
C-Rock - 28 Apr 2006 21:25 GMT
i think i figured it out... i was having an error with the string from the
database.
my netconnection debugger stops working after a few times and i have to
restart flash to get it to work again... it's very screwy...
thanks for your time though...