Solved

Flash remoting with coldfusion getting the simple query results from cfc

Posted on 2004-10-09
10
261 Views
Last Modified: 2013-12-16
How to get simple query results from cfc where the value of the parameter "un" is defined in the flash textbox.

------This is the cfc file---------------
<cfcomponent hint="Provides all data about the movies.">
<cffunction name="MovieRecordSetProvider" hint="Returns an array to populate the listBox." returntype="query" access="remote">
<CFQUERY NAME="listQuery" DATASOURCE="brochure">
    SELECT *
    FROM brochuredata
    WHERE un =#FLASH.UN#
    </CFQUERY>
</cfcomponent>

----following is in the flash first frame----
UN = "users";
#include "NetServices.as"
#include "Dataglue.as"
// Remoting functions
if (inited == null) {
      inited = true;
      NetServices.setDefaultGatewayUrl("http://localhost:8500/flashservices/gateway");
      gateway_conn = NetServices.createGatewayConnection();
      myService = gateway_conn.getService("Remoting.transactions", this);
      //myService.MovieRecordSetProvider();
    myService.MoviveRecordSetProvider(un:users);
}

When I execute this i get
NetServices info 2: MoviveRecordSetProvider_Status was received from server:  Service threw an exception during method invocation: CF Adapter: Service Remoting.transactions does not have a method "MoviveRecordSetProvider" that matches the name and parameters provided.

thanks for the help guys
0
Comment
Question by:tagtekin
[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
  • 5
  • 3
10 Comments
 
LVL 27

Expert Comment

by:negatyve
ID: 12270288
first of all, your method is:

MovieRecordSetProvider

not

MoviveRecordSetProvider
0
 
LVL 27

Accepted Solution

by:
negatyve earned 500 total points
ID: 12270326
then, if the textfield instance name is "users", you should call it this way:

myService.MovieRecordSetProvider(users.text);
0
 

Author Comment

by:tagtekin
ID: 12271066
---un is the text box name and also one of the db identifer------
un = "Joe";
#include "NetServices.as"
#include "Dataglue.as"
// Remoting functions
if (inited == null) {
     inited = true;
     NetServices.setDefaultGatewayUrl("http://localhost:8500/flashservices/gateway");
     gateway_conn = NetServices.createGatewayConnection();
     myService = gateway_conn.getService("Remoting.transactions", this);
     //myService.MovieRecordSetProvider();
    myService.MoviveRecordSetProvider(un.text);
}

------This is the cfc file---------------
<cfcomponent hint="Provides all data about the movies.">
<cffunction name="MovieRecordSetProvider" hint="Returns an array to populate the listBox." returntype="query" access="remote">
<CFQUERY NAME="listQuery" DATASOURCE="brochure">
    SELECT *
    FROM brochuredata
    WHERE un =#FLASH.UN#
    </CFQUERY>
</cfcomponent>
-----this time i get----
NetServices info 2: MoviveRecordSetProvider_Status was received from server:  Service threw an exception during method invocation: CF Adapter: Service Remoting.transactions does not have a method "MoviveRecordSetProvider" that matches the name and parameters provided.
0
Report: Liquid Web beats Amazon, Rackspace & More

A study by performance analyst firm Cloud Spectator finds that Liquid Web beats rivals Amazon, Rackspace and DigitalOcean when it comes to website and cloud application performance.

 

Author Comment

by:tagtekin
ID: 12271603
--this is with the fixed function--- I get the following error

NetServices info 2: MovieRecordSetProvider_Status was received from server:  Service threw an exception during method invocation: Element UN is undefined in FLASH.

---un is the text box name and also one of the db identifer------
un = "Joe";
#include "NetServices.as"
#include "Dataglue.as"
// Remoting functions
if (inited == null) {
     inited = true;
     NetServices.setDefaultGatewayUrl("http://localhost:8500/flashservices/gateway");
     gateway_conn = NetServices.createGatewayConnection();
     myService = gateway_conn.getService("Remoting.transactions", this);
     //myService.MovieRecordSetProvider();
    myService.MoviveRecordSetProvider(un.text);
}

------This is the cfc file---------------
<cfcomponent hint="Provides all data about the movies.">
<cffunction name="MovieRecordSetProvider" hint="Returns an array to populate the listBox." returntype="query" access="remote">
<CFQUERY NAME="listQuery" DATASOURCE="brochure">
    SELECT *
    FROM brochuredata
    WHERE un =#FLASH.UN#
    </CFQUERY>
</cfcomponent>
-----this time i get----
NetServices info 2: MoviveRecordSetProvider_Status was received from server:  Service threw an exception during method invocation: CF Adapter: Service Remoting.transactions does not have a method "MoviveRecordSetProvider" that matches the name and parameters provided.
0
 

Author Comment

by:tagtekin
ID: 12271609
--this is with the fixed function--- I get the following error

NetServices info 2: MovieRecordSetProvider_Status was received from server:  Service threw an exception during method invocation: Element UN is undefined in FLASH.

---un is the text box name and also one of the db identifer------
un = "Joe";
#include "NetServices.as"
#include "Dataglue.as"
// Remoting functions
if (inited == null) {
     inited = true;
     NetServices.setDefaultGatewayUrl("http://localhost:8500/flashservices/gateway");
     gateway_conn = NetServices.createGatewayConnection();
     myService = gateway_conn.getService("Remoting.transactions", this);
     //myService.MovieRecordSetProvider();
    myService.MovieRecordSetProvider(un.text);
}

------This is the cfc file---------------
<cfcomponent hint="Provides all data about the movies.">
<cffunction name="MovieRecordSetProvider" hint="Returns an array to populate the listBox." returntype="query" access="remote">
<CFQUERY NAME="listQuery" DATASOURCE="brochure">
    SELECT *
    FROM brochuredata
    WHERE un =#FLASH.UN#
    </CFQUERY>
</cfcomponent>
-----this time i get----
NetServices info 2: MoviveRecordSetProvider_Status was received from server:  Service threw an exception during method invocation: CF Adapter: Service Remoting.transactions does not have a method "MoviveRecordSetProvider" that matches the name and parameters provided.
0
 

Author Comment

by:tagtekin
ID: 12271728
This time I get the following. I feel like i am getting closer. Thanks or the help

NetServices info 2: MovieRecordSetProvider_Status was received from server:  Service threw an exception during method invocation: Error Executing Database Query.


un = "joe";
#include "NetServices.as"
#include "Dataglue.as"
// Remoting functions
if (inited == null) {
     inited = true;
     NetServices.setDefaultGatewayUrl("http://localhost:8500/flashservices/gateway");
     gateway_conn = NetServices.createGatewayConnection();
     myService = gateway_conn.getService("Remoting.transactions", this);
     //myService.MovieRecordSetProvider();
    myService.MovieRecordSetProvider(un);


}
function MovieRecordSetProvider_Result(result) {
      var detailRecord = result.getItemAt(1);
      movieDetail.text = detailRecord.id;
      
}

<cfcomponent hint="Provides all data about the movies.">

<cffunction name="MovieRecordSetProvider" hint="Returns an array to populate the listBox." returntype="query" access="remote">
    <!--- Query the database for story records --->
   <CFARGUMENT NAME="un" TYPE="string">

      <CFQUERY NAME="listQuery" DATASOURCE="brochure">
    SELECT *
    FROM brochuredata
    WHERE un =#arguments.un#
   
      </CFQUERY>
    <CFRETURN listQuery>

  </cffunction>
  </cfcomponent>
0
 

Author Comment

by:tagtekin
ID: 12271844
Ahaa got it here s the correct code

<cfcomponent hint="Provides all data about the movies.">

<cffunction name="MovieRecordSetProvider" hint="Returns an array to populate the listBox." returntype="query" access="remote">
    <!--- Query the database for story records --->
   <CFARGUMENT NAME="un" TYPE="string" required="true">

      <CFQUERY NAME="listQuery" DATASOURCE="brochure">
    SELECT *
    FROM brochuredata
  WHERE un ='#un#'
   
      </CFQUERY>
    <CFRETURN listQuery>

  </cffunction>
un = "Joe";
#include "NetServices.as"
#include "Dataglue.as"
// Remoting functions
if (inited == null) {
     inited = true;
     NetServices.setDefaultGatewayUrl("http://localhost:8500/flashservices/gateway");
     gateway_conn = NetServices.createGatewayConnection();
     myService = gateway_conn.getService("Remoting.transactions", this);
     //myService.MovieRecordSetProvider();
     myService.MovieRecordSetProvider(un);
       trace(un);


}

0
 
LVL 27

Expert Comment

by:negatyve
ID: 12273064
yes it is, but you should target your textfield text property...
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

Suggested Solutions

Title # Comments Views Activity
You Tube Videos not playing 9 144
Common Front Ends using Dynamics CRM 3 138
I starting with php 12 143
Built-in chrome Flash not working 8 22
Recently, I was asked to recommend a tracking system to be implemented on a clients website. As the entire site was built on flash, my first thought was to suggest custom built tracking system. However, our company at that point of time didn't h…
Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

734 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