envizion
asked on
RemotingFlash Sites
Where i can find the scripts of addind,deleting and update scripts of flash remoting with coldfusion. I search but i find only model scripts. But I want Add and Delete like scripts. Tell me hte website addresses or books to find these things.
thanks
thanks
you mean "addind,deleting and update" a database?
ASKER
to negatyve
Yes Adding Deletin updatind and retriving also i want answers.
Yes Adding Deletin updatind and retriving also i want answers.
search for the Time Entry application at Macromedia site...
http://www.macromedia.com/devnet/mx/flash/articles/time_entry.html
http://www.macromedia.com/devnet/mx/flash/articles/time_entry.html
these are examples of coldfusion code to add, update, insert and delete. do you need the flash code too?
<cffunction access="remote" output="false" returntype="any" name="GetUser">
<cfargument name="userid" required="true" type="numeric" />
<cftry>
<cfquery datasource="#application.d sn#" name="GetUserQuery">
SELECT * FROM Users WHERE userid = #arguments.userid#
</cfquery>
<cfcatch>
<cfreturn "error">
</cfcatch>
</cftry>
<cfreturn GetUserQuery>
</cffunction>
<cffunction access="remote" output="false" returntype="string" name="AddUser">
<cfargument name="username" required="true" type="string" />
<cfargument name="password" required="true" type="string" />
<cftry>
<cfquery datasource="#application.d sn#">
INSERT INTO Users (username, password)
VALUES ('#arguments.username#', '#arguments.password#')
</cfquery>
<cfcatch>
<cfreturn "error">
</cfcatch>
</cftry>
<cfreturn "done">
</cffunction>
<cffunction access="remote" output="false" returntype="string" name="UpdateUser">
<cfargument name="userid" required="true" type="numeric" />
<cfargument name="usname" required="true" type="string" />
<cftry>
<cfquery datasource="#application.d sn#">
UPDATE Users
SET username = '#arguments.usname#'
WHERE userid = #arguments.userid#
</cfquery>
<cfcatch>
<cfreturn "error">
</cfcatch>
</cftry>
<cfreturn "done">
</cffunction>
<cffunction access="remote" output="false" returntype="string" name="DeleteUser">
<cfargument name="userid" required="true" type="numeric" />
<cftry>
<cfquery datasource="#application.d sn#">
DELETE FROM Users WHERE userid = #arguments.userid#
</cfquery>
<cfcatch>
<cfreturn "error">
</cfcatch>
</cftry>
<cfreturn "done">
</cffunction>
<cffunction access="remote" output="false" returntype="any" name="GetUser">
<cfargument name="userid" required="true" type="numeric" />
<cftry>
<cfquery datasource="#application.d
SELECT * FROM Users WHERE userid = #arguments.userid#
</cfquery>
<cfcatch>
<cfreturn "error">
</cfcatch>
</cftry>
<cfreturn GetUserQuery>
</cffunction>
<cffunction access="remote" output="false" returntype="string" name="AddUser">
<cfargument name="username" required="true" type="string" />
<cfargument name="password" required="true" type="string" />
<cftry>
<cfquery datasource="#application.d
INSERT INTO Users (username, password)
VALUES ('#arguments.username#', '#arguments.password#')
</cfquery>
<cfcatch>
<cfreturn "error">
</cfcatch>
</cftry>
<cfreturn "done">
</cffunction>
<cffunction access="remote" output="false" returntype="string" name="UpdateUser">
<cfargument name="userid" required="true" type="numeric" />
<cfargument name="usname" required="true" type="string" />
<cftry>
<cfquery datasource="#application.d
UPDATE Users
SET username = '#arguments.usname#'
WHERE userid = #arguments.userid#
</cfquery>
<cfcatch>
<cfreturn "error">
</cfcatch>
</cftry>
<cfreturn "done">
</cffunction>
<cffunction access="remote" output="false" returntype="string" name="DeleteUser">
<cfargument name="userid" required="true" type="numeric" />
<cftry>
<cfquery datasource="#application.d
DELETE FROM Users WHERE userid = #arguments.userid#
</cfquery>
<cfcatch>
<cfreturn "error">
</cfcatch>
</cftry>
<cfreturn "done">
</cffunction>
ASKER
To Negatyve
Thanks for the code of cold fusion but I need Flash mx 2004 code also for this thing and search also i need. Already I finished update and delete but i need how can i retrive all infomation of particular user or student or any other person. in flash also i need this solutions.
thanks
Thanks for the code of cold fusion but I need Flash mx 2004 code also for this thing and search also i need. Already I finished update and delete but i need how can i retrive all infomation of particular user or student or any other person. in flash also i need this solutions.
thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I appreciate this comment:
https://www.experts-exchange.com/questions/21183885/RemotingFlash-Sites.html#12652178
https://www.experts-exchange.com/questions/21183885/RemotingFlash-Sites.html#12652178
Is this one suits you?
http://livedocs.macromedia.com/flashremoting/mx/Using_Flash_Remoting_MX/usingFRCF.htm
Vicker