Yes, and I'll go a step further.  Reading from a DataGrid directly is
practically impossible.

 

What is your back-end platform, the target of your HTTPService call?

 

I think I would not advise a separate call for each row, though
HTTPService seems very fast and this will probably work ok.  But it just
"feels" wrong to torture the internet connection like that. Instead,
build an xml string that has the necessary information to build the
(SQL?) insert or update queries fo all the rows, post that to the
HTTPService, and on the server, either build that SQL query or even call
parameterized stored procedures.

 

I have even built the SQL itself in Flex and just passed it through the
business tier to the database.  This method has potential performance
and security issues however.

 

Tracy

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of ben.clinkinbeard
Sent: Tuesday, December 05, 2006 11:34 AM
To: [email protected]
Subject: [flexcoders] Re: Need Help...Passing data from datagrid to
database

 

I think in most cases, reading from a DataGrid is unnecessary and I
would recommend against it. Instead, you should iterate over the
DataGrid's dataProvider to access the data. The exact syntax for that
will depend on what you're using as your dataProvider, but assuming
its an ArrayCollection or XMLListCollection you should be able to just
use a for each loop and make your HTTPService calls from there.

HTH,
Ben

--- In [email protected] <mailto:flexcoders%40yahoogroups.com>
, Vinod M Jacob <[EMAIL PROTECTED]> wrote:
>
> Hi,
> 
> Can anyone help me in solving this problem.
> My basic need is to pass the data from a datagrid to the database.
> 
> I want to read the data in datagrid row by row.
> Consider i have a datagrid with two colums and five rows.
> In a for loop i want to get the data in each row one by one so that
i can pass 
> this value to an HTTPService one by one so that i can store it in
the database.
> 
> If anyone of you have any other suggestion you are welcomed.
> I would really appreciate you effort in solving this problem.
> 
> Thanks & Regards,
> Vinod M Jacob
> 
> 
> ---------------------------------
> Everyone is raving about the all-new Yahoo! Mail beta.
>

 

Reply via email to