Macromedia Flash Server - Flash Remoting + Recordset...how do I use it?

This is Interesting: Free IT Magazines  
Home > Archive > Macromedia Flash Server > April 2005 > Flash Remoting + Recordset...how do I use it?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Flash Remoting + Recordset...how do I use it?
Michael D. Randolph

2005-04-26, 5:45 pm

I have a .NET function returning a DataTable to a flash client. As far
as I know, this should get converted to a RecordSet before it gets to
the client. I get the ResultEvent just fine, but when I try to cast the
result as a RecordSet, it tells me that is an invalid data type and that
it is expecting an object. How do I return a DataTable from a .NET
function and receive it as a recordset in Flash Remoting? (preferably
the AS2 iteration of FR)



Michael Randolph


Michael D. Randolph

2005-04-26, 5:45 pm

If I take all of my data types out, everything seems to work fine. I'd
like to declare the result as a RecordSet though...is this not possible?
It looks like this now:

function GetPresentationData_Result(re):Void {
trace (re.result.getLength());
}

But I'd like to use data types, so it should look like this:

function GetPresentationData_Result(re:ResultEven
t):Void {
var rs:RecordSet = re.result; //returns "Type mismatch in
assignment statement: found Object where mx.remoting.RecordSet is
required."
trace (rs.getLength());
}

Michael Randolph

-----Original Message-----
From: flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org
[mailto:flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org] On Behalf Of Michael D.
Randolph
Sent: Tuesday, April 26, 2005 11:50 AM
To: FlashComm Mailing List
Subject: [FlashComm] Flash Remoting + Recordset...how do I use it?

I have a .NET function returning a DataTable to a flash client. As far
as I know, this should get converted to a RecordSet before it gets to
the client. I get the ResultEvent just fine, but when I try to cast the
result as a RecordSet, it tells me that is an invalid data type and that
it is expecting an object. How do I return a DataTable from a .NET
function and receive it as a recordset in Flash Remoting? (preferably
the AS2 iteration of FR)



Michael Randolph




Robert Laing

2005-04-26, 5:45 pm

have=20you=20tried=20casting=20the=20res
ult=20as=20a=20Recordset?
var=20rs:RecordSet=20=3D=20Recordset(re.result);


-----Original=20Message-----
From:=20flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org
[mailto:flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org]On=20Behalf=20Of=20Michael=
=20D.
Randolph
Sent:=2026=20April=202005=2016:58
To:=20FlashComm=20Mailing=20List
Subject:=20RE:=20& #91;FlashComm]=20Flash=20Remoting=20+=20
Recordset...how=20do=
=20I=20use=20it?


If=20I=20take=20all=20of=20my=20data=20t
ypes=20out,=20everything=20seems=20=
to=20work=20fine.=20=20I'd
like=20to=20declare=20the=20result=20as=
20a=20RecordSet=20though...is=20th=
is=20not=20possible?
It=20looks=20like=20this=20now:

function=20GetPresentationData_Result(re
):Void=20{
=09trace=20(re.result.getLength());
}

But=20I'd=20like=20to=20use=20data=20typ
es,=20so=20it=20should=20look=20li=
ke=20this:

function=20GetPresentationData_Result(re
:ResultEvent):Void=20{
=09var=20rs:RecordSet=20=3D=20re.result;=20=20//returns=20"Type=20mismatch=
=20in
assignment=20statement:=20found=20Object
=20where=20mx.remoting.RecordSet=20=
is
required."
=09trace=20(rs.getLength());
}

Michael=20Randolph

-----Original=20Message-----
From:=20flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org
[mailto:flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org]=20On=20Behalf=20Of=20Mich=
ael=20D.
Randolph
Sent:=20Tuesday,=20April=2026,=202005=20
11:50=20AM
To:=20FlashComm=20Mailing=20List
Subject:=20& #91;FlashComm]=20Flash=20Remoting=20+=20
Recordset...how=20do=20I=20=
use=20it?

I=20have=20a=20. NET=20function=20returning=20a=20DataTab
le=20to=20a=20flas=
h=20client.=20=20As=20far
as=20I=20know,=20this=20should=20get=20c
onverted=20to=20a=20RecordSet=20be=
fore=20it=20gets=20to
the=20client. =20=20I=20get=20the=20ResultEvent=20just
=20fine,=20but=20when=
=20I=20try=20to=20cast=20the
result=20as=20a=20RecordSet,=20it=20tell
s=20me=20that=20is=20an=20invalid=20=
data=20type=20and=20that
it=20is=20expecting=20an=20object. =20=20How=20do=20I=20return=20a=20DataTa
=
ble=20from=20a=20.NET
function=20and=20receive=20it=20as=20a=2
0recordset=20in=20Flash=20Remoting=
?=20=20(preferably
the=20AS2=20iteration=20of=20FR)

=20

Michael=20Randolph




This=20e- mail=20and=20any=20attached=20files=20ar
e=20for=20the=20exclusive=
=20use=20of=20the=20addressee=20and=20ma
y=20contain=20privileged=20and/or=20=
confidential=20information.=20If=20you=20receive=20this=20e-mail=20in=20er=
ror=20you=20should=20not=20disclose=20th
e=20contents=20to=20any=20other=20=
person=20nor=20take=20copies=20but=20sho
uld=20delete=20it=20and=20telephon=
e=20us=20immediately=20on=20+44(0)20=207
440=201100.

TEQUILA\=20London=20Limited=20does=20not
=20make=20any=20warranty=20as=20to=
=20the=20accuracy=20or=20completeness=20
of=20this=20e-mail=20and=20we=20ac=
cept=20no=20liability=20for=20its=20cont
ent=20or=20use.=20Any=20opinions=20=
expressed=20in=20this=20e- mail=20are=20those=20of=20the=20author=2
0and=20d=
o=20not=20necessarily=20reflect=20the=20
opinions=20of=20TEQUILA\=20London=20=
Limited.

TEQUILA\=20London=20Limited=20operates=2
0within=20the=20parameters=20set=20=
by=20the=20Data=20Protection=20Act=20199
8=20with=20regard=20to=20the=20use=
=20of=20personal=20information=20includi
ng=20e-mail=20addresses.=20We=20ac=
cept=20no=20liability=20for=20the=20forw
arding=20of=20this=20e-mail=20to=20=
other=20parties=20that=20may=20result=20
in=20unsolicited=20e-mails=20being=
=20received=20by=20those=20whose=20email
=20addresses=20appear=20in=20this=20=
e-mail.

=-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=-----------------------------------------------------------

To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm

JesterXL

2005-04-26, 5:45 pm

Try:

function GetPresentationData_Result(re:ResultEven
t):Void {
var rs:RecordSet = RecordSet(re.result);
trace (rs.getLength());
}

Bling bling!

----- Original Message -----
From: "Michael D. Randolph" <mrandolph-BLI8p3VsWNHtqXgxI/4nyg@public.gmane.org>
To: "FlashComm Mailing List" <flashcomm-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org>
Sent: Tuesday, April 26, 2005 11:57 AM
Subject: RE: [FlashComm] Flash Remoting + Recordset...how do I use it?


If I take all of my data types out, everything seems to work fine. I'd
like to declare the result as a RecordSet though...is this not possible?
It looks like this now:

function GetPresentationData_Result(re):Void {
trace (re.result.getLength());
}

But I'd like to use data types, so it should look like this:

function GetPresentationData_Result(re:ResultEven
t):Void {
var rs:RecordSet = re.result; //returns "Type mismatch in
assignment statement: found Object where mx.remoting.RecordSet is
required."
trace (rs.getLength());
}

Michael Randolph

-----Original Message-----
From: flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org
[mailto:flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org] On Behalf Of Michael D.
Randolph
Sent: Tuesday, April 26, 2005 11:50 AM
To: FlashComm Mailing List
Subject: [FlashComm] Flash Remoting + Recordset...how do I use it?

I have a .NET function returning a DataTable to a flash client. As far
as I know, this should get converted to a RecordSet before it gets to
the client. I get the ResultEvent just fine, but when I try to cast the
result as a RecordSet, it tells me that is an invalid data type and that
it is expecting an object. How do I return a DataTable from a .NET
function and receive it as a recordset in Flash Remoting? (preferably
the AS2 iteration of FR)



Michael Randolph






--------------------------------------------------------------------------------



=-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=-----------------------------------------------------------

To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm


=-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=-----------------------------------------------------------

To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm

Michael D. Randolph

2005-04-26, 5:45 pm

Worked like a charm, thanks Robert.

Michael Randolph
IMAGE PLANT
(973) 244-9220
mrandolph-PMb9m0z8LQpWk0Htik3J/w@public.gmane.org

-----Original Message-----
From: flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org
[mailto:flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org] On Behalf Of Robert
Laing
Sent: Tuesday, April 26, 2005 11:59 AM
To: FlashComm Mailing List
Subject: RE: [FlashComm] Flash Remoting + Recordset...how do I use it?

have you tried casting the result as a Recordset?
var rs:RecordSet = Recordset(re.result);


-----Original Message-----
From: flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org
[mailto:flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org]On Behalf Of Michael D.
Randolph
Sent: 26 April 2005 16:58
To: FlashComm Mailing List
Subject: RE: [FlashComm] Flash Remoting + Recordset...how do I use it?


If I take all of my data types out, everything seems to work fine. I'd
like to declare the result as a RecordSet though...is this not possible?
It looks like this now:

function GetPresentationData_Result(re):Void {
trace (re.result.getLength());
}

But I'd like to use data types, so it should look like this:

function GetPresentationData_Result(re:ResultEven
t):Void {
var rs:RecordSet = re.result; //returns "Type mismatch in
assignment statement: found Object where mx.remoting.RecordSet is
required."
trace (rs.getLength());
}

Michael Randolph

-----Original Message-----
From: flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org
[mailto:flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org] On Behalf Of Michael D.
Randolph
Sent: Tuesday, April 26, 2005 11:50 AM
To: FlashComm Mailing List
Subject: [FlashComm] Flash Remoting + Recordset...how do I use it?

I have a .NET function returning a DataTable to a flash client. As far
as I know, this should get converted to a RecordSet before it gets to
the client. I get the ResultEvent just fine, but when I try to cast the
result as a RecordSet, it tells me that is an invalid data type and that
it is expecting an object. How do I return a DataTable from a .NET
function and receive it as a recordset in Flash Remoting? (preferably
the AS2 iteration of FR)



Michael Randolph




This e-mail and any attached files are for the exclusive use of the
addressee and may contain privileged and/or confidential information. If
you receive this e-mail in error you should not disclose the contents to
any other person nor take copies but should delete it and telephone us
immediately on +44(0)20 7440 1100.

TEQUILA\ London Limited does not make any warranty as to the accuracy or
completeness of this e-mail and we accept no liability for its content
or use. Any opinions expressed in this e-mail are those of the author
and do not necessarily reflect the opinions of TEQUILA\ London Limited.

TEQUILA\ London Limited operates within the parameters set by the Data
Protection Act 1998 with regard to the use of personal information
including e-mail addresses. We accept no liability for the forwarding of
this e-mail to other parties that may result in unsolicited e-mails
being received by those whose email addresses appear in this e-mail.

=---------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=---------------------------------------------------------

To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm



Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com