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
envizionAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

vickerleungCommented:
0
negatyveCommented:
you mean "addind,deleting and update" a database?
0
envizionAuthor Commented:
to negatyve

Yes Adding Deletin updatind and retriving also i want answers.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

nishasrilankanCommented:
search for the Time Entry application at Macromedia site...
http://www.macromedia.com/devnet/mx/flash/articles/time_entry.html
0
negatyveCommented:
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.dsn#" 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.dsn#">
                        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.dsn#">
                        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.dsn#">
                        DELETE FROM Users WHERE userid = #arguments.userid#
                  </cfquery>
                  <cfcatch>
                        <cfreturn "error">
                  </cfcatch>
            </cftry>
            <cfreturn "done">
      </cffunction>
0
envizionAuthor Commented:
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
0
negatyveCommented:
This is an example of search method:

<cffunction access="remote" name="SearchUsers" output="false" returntype="any" displayname="SearchUsers">
      <cfargument name="Criteria" type="string" required="true" hint="Search field">
      <cfargument name="KeyWords" type="string" required="true" hint="Search pattern">
      <cftry>
            <cfquery name="SearchResult" datasource="#application.dsn#">
                  SELECT * FROM Users WHERE #arguments.Criteria# LIKE '%#arguments.KeyWords#%'
            </cfquery>
            <cfcatch>
                  <cfreturn "error">
            </cfcatch>
      </cftry>
      <cfreturn SearchResult>
</cffunction>



To use it in flash:

// =================================================
#include "NetServices.as"
NetServices.setDefaultGatewayUrl("http://localhost/flashservices/gateway");
remote_conn = NetServices.createGatewayConnection();
users__conn = remote_conn.getService("path.to.component");

var responder = new Object();
responder.onResult = function(result)
{
      // here you have got result RecordSet
      // from the server
};
// call remote function, passing as parameters the
// object waiting for response, then the remote
// function parameters (for searchUser, the criteria
// field, then the search pattern: here you are searching
// for a user with UserName similar or equal to "Gandalf")
users__conn.SearchUsers(responder, "UserName", "Gandalf");
// =================================================
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Development Software

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.