all groups > macromedia flash flash remoting > november 2003 >
You're in the

macromedia flash flash remoting

group:

service_result(result) - Recordset out side the service result handler !!


service_result(result) - Recordset out side the service result handler !! mrism
11/27/2003 3:49:23 PM
macromedia flash flash remoting: Hi All,

This is my question :

Can I use a Recordset out side of the service_result that I get in a service_result function
eg :

/********************************************************************/
NetServices.setDefaultGatewayURL("http://localhost/flashremoting/gateway.aspx");
myConnection = NetServices.createGatewayConnection();

myService = myConnection.getService("TestProject.Class1", this);
myService.getCategories();

function getCategories_result(result)
{
rsNew = result;
}

for(i=0;i<rsNew.getLength;i++)
{
// and some more code is here.
}

/*******************************************************************/
It's not working at the moment. I want use rsNew recordset anywhere in the code. Is that possible? If yes, how to work it out? I want to us the Recordsets throughout the code in different situations but not in the "getCategories_result" handler function. I hope you understood what I meant. Please show me the way.

Thanks.

Re:A Simple Question About Recordset Object mrism
12/1/2003 9:38:55 AM
no answers? is this not doable??

Re: service_result(result) - Recordset out side the service result handler !! Tom Muck
12/2/2003 10:58:18 AM

[quoted text, click to view]
code. Is that possible? If yes, how to work it out? I want to us the
Recordsets throughout the code in different situations but not in the
"getCategories_result" handler function. I hope you understood what I meant.
Please show me the way.


You can use a global variable.

var rsNew;

function getCategories_result(result)
{
rsNew = result;
}


--
---------------------------------------------------------------
Tom Muck
author -- Flash Remoting: The Definitive Guide
http://www.flash-remoting.com/notablog

Team Macromedia Volunteer for Flash

Extending Knowledge, Daily
http://www.communityMX.com/

AddThis Social Bookmark Button