tagtekin
asked on
Flash remoting with coldfusion getting the simple query results from cfc
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="MovieRecordSetProvid er" 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.setDefaultGate wayUrl("http://localhost:8500/flashservices/gateway") ;
gateway_conn = NetServices.createGatewayC onnection( );
myService = gateway_conn.getService("R emoting.tr ansactions ", this);
//myService.MovieRecordSet Provider() ;
myService.MoviveRecordSetP rovider(un :users);
}
When I execute this i get
NetServices info 2: MoviveRecordSetProvider_St atus 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
------This is the cfc file---------------
<cfcomponent hint="Provides all data about the movies.">
<cffunction name="MovieRecordSetProvid
<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.setDefaultGate
gateway_conn = NetServices.createGatewayC
myService = gateway_conn.getService("R
//myService.MovieRecordSet
myService.MoviveRecordSetP
}
When I execute this i get
NetServices info 2: MoviveRecordSetProvider_St
thanks for the help guys
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
---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.setDefaultGate wayUrl("http://localhost:8500/flashservices/gateway") ;
gateway_conn = NetServices.createGatewayC onnection( );
myService = gateway_conn.getService("R emoting.tr ansactions ", this);
//myService.MovieRecordSet Provider() ;
myService.MoviveRecordSetP rovider(un .text);
}
------This is the cfc file---------------
<cfcomponent hint="Provides all data about the movies.">
<cffunction name="MovieRecordSetProvid er" 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_St atus 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.
un = "Joe";
#include "NetServices.as"
#include "Dataglue.as"
// Remoting functions
if (inited == null) {
inited = true;
NetServices.setDefaultGate
gateway_conn = NetServices.createGatewayC
myService = gateway_conn.getService("R
//myService.MovieRecordSet
myService.MoviveRecordSetP
}
------This is the cfc file---------------
<cfcomponent hint="Provides all data about the movies.">
<cffunction name="MovieRecordSetProvid
<CFQUERY NAME="listQuery" DATASOURCE="brochure">
SELECT *
FROM brochuredata
WHERE un =#FLASH.UN#
</CFQUERY>
</cfcomponent>
-----this time i get----
NetServices info 2: MoviveRecordSetProvider_St
ASKER
--this is with the fixed function--- I get the following error
NetServices info 2: MovieRecordSetProvider_Sta tus 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.setDefaultGate wayUrl("http://localhost:8500/flashservices/gateway") ;
gateway_conn = NetServices.createGatewayC onnection( );
myService = gateway_conn.getService("R emoting.tr ansactions ", this);
//myService.MovieRecordSet Provider() ;
myService.MoviveRecordSetP rovider(un .text);
}
------This is the cfc file---------------
<cfcomponent hint="Provides all data about the movies.">
<cffunction name="MovieRecordSetProvid er" 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_St atus 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.
NetServices info 2: MovieRecordSetProvider_Sta
---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.setDefaultGate
gateway_conn = NetServices.createGatewayC
myService = gateway_conn.getService("R
//myService.MovieRecordSet
myService.MoviveRecordSetP
}
------This is the cfc file---------------
<cfcomponent hint="Provides all data about the movies.">
<cffunction name="MovieRecordSetProvid
<CFQUERY NAME="listQuery" DATASOURCE="brochure">
SELECT *
FROM brochuredata
WHERE un =#FLASH.UN#
</CFQUERY>
</cfcomponent>
-----this time i get----
NetServices info 2: MoviveRecordSetProvider_St
ASKER
--this is with the fixed function--- I get the following error
NetServices info 2: MovieRecordSetProvider_Sta tus 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.setDefaultGate wayUrl("http://localhost:8500/flashservices/gateway") ;
gateway_conn = NetServices.createGatewayC onnection( );
myService = gateway_conn.getService("R emoting.tr ansactions ", this);
//myService.MovieRecordSet Provider() ;
myService.MovieRecordSetPr ovider(un. text);
}
------This is the cfc file---------------
<cfcomponent hint="Provides all data about the movies.">
<cffunction name="MovieRecordSetProvid er" 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_St atus 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.
NetServices info 2: MovieRecordSetProvider_Sta
---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.setDefaultGate
gateway_conn = NetServices.createGatewayC
myService = gateway_conn.getService("R
//myService.MovieRecordSet
myService.MovieRecordSetPr
}
------This is the cfc file---------------
<cfcomponent hint="Provides all data about the movies.">
<cffunction name="MovieRecordSetProvid
<CFQUERY NAME="listQuery" DATASOURCE="brochure">
SELECT *
FROM brochuredata
WHERE un =#FLASH.UN#
</CFQUERY>
</cfcomponent>
-----this time i get----
NetServices info 2: MoviveRecordSetProvider_St
ASKER
This time I get the following. I feel like i am getting closer. Thanks or the help
NetServices info 2: MovieRecordSetProvider_Sta tus 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.setDefaultGate wayUrl("http://localhost:8500/flashservices/gateway") ;
gateway_conn = NetServices.createGatewayC onnection( );
myService = gateway_conn.getService("R emoting.tr ansactions ", this);
//myService.MovieRecordSet Provider() ;
myService.MovieRecordSetPr ovider(un) ;
}
function MovieRecordSetProvider_Res ult(result ) {
var detailRecord = result.getItemAt(1);
movieDetail.text = detailRecord.id;
}
<cfcomponent hint="Provides all data about the movies.">
<cffunction name="MovieRecordSetProvid er" 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>
NetServices info 2: MovieRecordSetProvider_Sta
un = "joe";
#include "NetServices.as"
#include "Dataglue.as"
// Remoting functions
if (inited == null) {
inited = true;
NetServices.setDefaultGate
gateway_conn = NetServices.createGatewayC
myService = gateway_conn.getService("R
//myService.MovieRecordSet
myService.MovieRecordSetPr
}
function MovieRecordSetProvider_Res
var detailRecord = result.getItemAt(1);
movieDetail.text = detailRecord.id;
}
<cfcomponent hint="Provides all data about the movies.">
<cffunction name="MovieRecordSetProvid
<!--- 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>
ASKER
Ahaa got it here s the correct code
<cfcomponent hint="Provides all data about the movies.">
<cffunction name="MovieRecordSetProvid er" 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.setDefaultGate wayUrl("http://localhost:8500/flashservices/gateway") ;
gateway_conn = NetServices.createGatewayC onnection( );
myService = gateway_conn.getService("R emoting.tr ansactions ", this);
//myService.MovieRecordSet Provider() ;
myService.MovieRecordSetPr ovider(un) ;
trace(un);
}
<cfcomponent hint="Provides all data about the movies.">
<cffunction name="MovieRecordSetProvid
<!--- 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.setDefaultGate
gateway_conn = NetServices.createGatewayC
myService = gateway_conn.getService("R
//myService.MovieRecordSet
myService.MovieRecordSetPr
trace(un);
}
yes it is, but you should target your textfield text property...
MovieRecordSetProvider
not
MoviveRecordSetProvider