all groups > macromedia flash flash remoting > april 2006 >
You're in the

macromedia flash flash remoting

group:

String error???


String error??? C-Rock
4/27/2006 6:17:28 PM
macromedia flash flash remoting: 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



Re: String error??? jag57
4/28/2006 8:14:19 PM
Could you tell us the exact error that occurs?

Re: String error??? C-Rock
4/28/2006 8:25:20 PM
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...
AddThis Social Bookmark Button