Great - thanks!

So with all that said, how can I save myself time, when sending DataSets
back to the server?  Right now, this is the code, which I've been using:

public DataSet fetchRecord(int id)
{       
        string sqlQuery = "SELECT * FROM Table WHERE ID = " + id;
        ... misc code ...
        adp.SelectCommand = cmd;
        DataSet ds = new DataSet();
        adp.Fill(ds, "Results");
                        
        return ds;
}

If the ASObject is to save me time, how can I directly populate my
ASObject with my "Results", if I only have the Add() Method at my
disposal?  If that is the case, I must first use my legacy ADO.NET Code,
populate my DataSet, and then LOOP through my DataSet, with each loop
kicking off the Add() Method of the ASObject - filling it up.

Why would I want to do this, if I can just send my DataSet back to my
Flex App?

Can't I somehow do this?

public ASObject fetchRecord(int id)
{       
        string sqlQuery = "SELECT * FROM Table WHERE ID = " + id;
        ... misc code ...
        adp.SelectCommand = cmd;
        DataSet ds = new DataSet();
        adp.Fill(ds, "Results");
        
        ASObject myASO = new ASObject();
        myASO.ASType = "Name of Registered Class on the Flex Side";

        myASO = ds;
        - or -
        myASO = ds.Tables[0]; (if it only accepts a Table);
        
        return myASO;
}

Can I do something similar to the above?  If not, then I may as well
keep using my native DataSets and/or DataTables.  Can you all clarify
this for me?

Thanks in advance,

Mike

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Peter Farland
Sent: Friday, June 24, 2005 2:00 PM
To: [email protected]
Subject: RE: [flexcoders] All potential Properties and Methods of
ASObject ??



FlashGateway.IO.ASObject subclasses System.Collections.Hashtable. It
adds only one extra property ASType which is used to map AMF
TypedObjects between the client and server as per the information
registered using Object.registerClass(). Said simply, it's just the
server side representation of an ActionScript Object.

Using an .ASPX page as a Flash Remoting service is not the same as C#
method invocation - .ASPX pages don't have method signatures or return
types so a special Flash page control was created which creates a
"Flash" scope that you can get access to passed in paramters from the
Flash.Params array and return results using Flash.Result. The
Flash.DataSource property and Flash.DataBind() function are convenience
methods to extract information out of DataTable, DataView or IEnumerable
DataSouces - the developer could process their own datasources and
update Flash.Result themselves in the .ASPX page. Since you're not
interested in using .ASPX pages then you can ignore the information on
the Flash scope and just concentrate on what you're used to - which
seems to be normal C# method invocation and returning objects. The Flash
scope has nothing to do with ASObject.



-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Mike Anderson
Sent: Friday, June 24, 2005 2:23 PM
To: [email protected]
Subject: [flexcoders] All potential Properties and Methods of ASObject
??

Hello All,

I am using the .NET Remoting environment - exclusively using Assemblies
(.dll's)

Due to absolutely poor documentation, MM makes VERY poor distinctions of
the Assembly method of Remoting (using the ASObject), and using "code
behind" .ASPX pages which I refuse to use.

It looks to me, that when using the .ASPX methods, the user has the
"Flash.DataSource" and "Flash.DataBind" options.  These options do not
exist for the ASObject.

In fact, the only things that have been documented, are
"ASObject.ASType" Property, and the "ASObject.Add()" Method - in which
you put a "Name/Value" pair within the Add() Method.  ALSO, totally
WRONG, the MM Docs say you use the "Flash.Result" Method to send the
results back.  Anybody who knows C#, knows that you must use the
"return" Method, when sending the expected result back.

So, my only hope, is for somebody on this list who's already been
through all this crap, to please post, all the Properties and Methods as
it relates to the ASObject.  Again, this is ONLY in the context of using
.NET Assemblies - not .ASPX pages, cuz they are totally unrelated.

Thanks SO much for all your help,

Mike



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links



 




--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links



 




--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to