Not a Remoting God but a Remoting Demi God
cosmiceye,
I working on a project that does exactly what you are tlaking about. The setup is basically this: ColdFusion Server/IIS Box, FlashComm Server, SQL7 Server, File Server, and an Email Server. The project uses Flash Remoting to the ColdFusion Server, ColdFusion processes all Querys to the SQL7 Server and SMTP request to the Email Server and Controls access to the File Server. SQL7 holds all data on location of files on File Server, usernames, passwords and application settings and permissions. File Server holds all files related to the application. FlashComm Server holds all video files and shared objects. So if you need a hand on something chances are I've run into that problem!
On a side note:
Quote:
Originally posted by Aware0
On a similar note, I can't get the SQL 'Contains()' statement to work from flash through remoting. I'm using Flash Dev Environment MX, ColdFusion Server MX(SE),Flash Remoting MX, and a Microsoft Access Database. I get an error when I pass a query like "Select * From MyTable Where Contains(EntryName, 'check')"
Might be with the MSAccess DB but I know the SQL syntax is correct, I've checked quite a few times.
The way I set mine up is the CFC does ALL of the work and only returns a value back to me. Example:
The CFC-
Code:
<cfcomponent>
<cffunction name="getUsers" access="remote" returntype="array">
<cfargument name="clientID" required='true'>
<cfquery name="getUserList" datasource="MySource" dbtype="odbc">
SELECT fName, lName, emailPrimary
FROM tblUserInfo
WHERE clientID = '#arguments.clientID#'
ORDER BY lName
</cfquery>
<cfset rList = ArrayNew(2)>
<cfset i=1>
<cfloop query="getUserList">
<cfset j = 1>
<cfset rList[i][j] = #lName#&", "&#fName#>
<cfset j=j+1>
<cfset rList[i][j] = #emailPrimary#>
<cfset i=i+1>
</cfloop>
<cfreturn rList>
</cffunction>
<cfcomponent>
The SWF File-
There is a movieclip with the following attached to it:
Code:
onClipEvent(load){
_level0.getMembers_List();
}
The Function Code:
Code:
getMembers_List = function(){
clientID = _global.clientID;
_global.mailService.getUsers(clientID);
this.onResult = function(dataFromCFC){
_global.usersList_rs = dataFromCFC;
}
}
Now the record set is stored as a global array variable and avaiable to the whole move. If I need any infomation from it just treat to like any other array. The beauty of this is not readily in your face. But crunch on this, how do you make a 2 or 3 dimintion array in Flash. Have you ever tried? It's complicated and fustrating how ever if you make a 2 or 3 diminational array in the CFC (Like the above example CFC does) and pass it to Flash it recognizes it and treats it just like a 2 or 3 dimintional array. SWEET!!!!!!
But making the CFC do the heavy lifting on Querying and Query Processing is definitly where it's at! So Happy coding.