Pakage your data up as an xml string in the Flex client. Send it to the
jsp page using HTTPService and process the xml there to update the
database.

 

Tracy

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of vkc_nair
Sent: Monday, October 15, 2007 8:24 PM
To: [email protected]
Subject: [flexcoders] How to update Database Data using HTTPService

 

Hi,

I'm new to Flex.

Created a flex application to retrive data from Oracle Database.

1. Created a Java class for the Object (Table) with get and set 
functions.

2. Created another Javaclass to get the data from Database using 
JDBC.

3. Used a JSP to get the data in XML format.

4. I'm able to display the data in Flex application.

5. How do I update the data changes in Flex application
back to the Database Table?

Could you please provide a sample or point me in right direction?

Thanks
Vimal

The JSP file.

<[EMAIL PROTECTED] import="flex.testdrive.gate.GateRuleService, 
flex.testdrive.gate.GateRule, 
java.util.List"%>
<?xml version="1.0" encoding="utf-8"?>
<gaterule>
<%
GateRuleService srv = new GateRuleService();
List list = null;
list = srv.getGateRule();
GateRule gaterule;
for (int i=0; i<list.size(); i++)
{
gaterule = (GateRule) list.get(i);
%> 
<gaterule rule_id="<%= gaterule.getRuleId()%>">
<procedure_name><%= gaterule.getProcName() %
></procedure_name>
<created><%= gaterule.getCreated() %></created>
<creator><%= gaterule.getCreator() %></creator>
<changed><%= gaterule.getChanged() %></changed>
<changer><%= gaterule.getChanger() %></changer>
<description><%= gaterule.getDescription() %></description>
</gaterule>
<%
}
%>
</gaterule>

 

Reply via email to