Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

RemotingFlash Sites

Posted on 2004-10-26
11
Medium Priority
?
249 Views
Last Modified: 2013-12-16
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
0
Comment
Question by:envizion
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
11 Comments
 
LVL 16

Expert Comment

by:vickerleung
ID: 12418182
0
 
LVL 27

Expert Comment

by:negatyve
ID: 12419595
you mean "addind,deleting and update" a database?
0
 

Author Comment

by:envizion
ID: 12429921
to negatyve

Yes Adding Deletin updatind and retriving also i want answers.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 6

Expert Comment

by:nishasrilankan
ID: 12429986
search for the Time Entry application at Macromedia site...
http://www.macromedia.com/devnet/mx/flash/articles/time_entry.html
0
 
LVL 27

Expert Comment

by:negatyve
ID: 12431410
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
 

Author Comment

by:envizion
ID: 12651238
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
 
LVL 27

Accepted Solution

by:
negatyve earned 2000 total points
ID: 12652178
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
 
LVL 9

Expert Comment

by:ddlam
ID: 14458433
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
In my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
The purpose of this video is to demonstrate how to set up an RSS Feed on a WordPress Website. This will be demonstrated using a Windows 8 PC. Feedburner will be used for this demonstration. Go to your WordPress login page. This will look like the…
The purpose of this video is to demonstrate how to set up the permalinks on a WordPress Website. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Go t…

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question