What is wrong with this datagrid not sending back data to mysql

Posted on 2011-04-29
Medium Priority
Last Modified: 2012-05-11
I am brand new to flashbuilder and looking over everything, I cannot figure out what I am missing to make this grid send data back to the mysql database.
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
			   xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" xmlns:pricingservice="services.pricingservice.*">
			import mx.controls.Alert;
			import mx.events.DataGridEvent;
			import mx.events.FlexEvent;
			protected function dataGrid_creationCompleteHandler(event:FlexEvent):void
				getAllpricingResult.token = pricingService.getAllpricing();

			protected function dataGrid_itemEditEndHandler(event:DataGridEvent):void

		<s:CallResponder id="updatepricingResult"/>
		<pricingservice:PricingService id="pricingService" fault="Alert.show(event.fault.faultString + '\n' + event.fault.faultDetail)" showBusyCursor="true"/>
		<s:CallResponder id="getAllpricingResult"/>
		<!-- Place non-visual elements (e.g., services, value objects) here -->
	<mx:DataGrid id="dataGrid" creationComplete="dataGrid_creationCompleteHandler(event)" dataProvider="{getAllpricingResult.lastResult}" editable="true" itemEditEnd="dataGrid_itemEditEndHandler(event)" change="dataGrid_changeHandler(event)" enabled="true" horizontalCenter="124" verticalCenter="-77">
			<mx:DataGridColumn headerText="idPricing" dataField="idPricing"/>
			<mx:DataGridColumn headerText="PieceType" dataField="PieceType"/>
			<mx:DataGridColumn headerText="PrintPrice" dataField="PrintPrice"/>
			<mx:DataGridColumn headerText="DBPostage" dataField="DBPostage"/>
			<mx:DataGridColumn headerText="SatPostage" dataField="SatPostage"/>
			<mx:DataGridColumn headerText="SatList" dataField="SatList"/>
			<mx:DataGridColumn headerText="TradAddressing" dataField="TradAddressing"/>
			<mx:DataGridColumn headerText="VariableAddressing" dataField="VariableAddressing"/>
			<mx:DataGridColumn headerText="ShippingMailOnly" dataField="ShippingMailOnly"/>
			<mx:DataGridColumn headerText="TradDBTotal" dataField="TradDBTotal"/>
			<mx:DataGridColumn headerText="VariableDBTotal" dataField="VariableDBTotal"/>
			<mx:DataGridColumn headerText="TradSatTotal" dataField="TradSatTotal"/>
			<mx:DataGridColumn headerText="VariableSatTotal" dataField="VariableSatTotal"/>

Open in new window

Question by:blitzone
1 Comment
LVL 10

Accepted Solution

koudry earned 2000 total points
ID: 35489952

I know absolutely nothing about Adobe Flex so my comment is only on the database side. I think you just need to do some basic checks:

Does the column listing match with the column on the database table that you are trying to write to? Check every single column and make sure they exist on the table in the correct order as listed on your flex script.

If you have an auto number or sequence which is used for the ID, remember that you cannot insert that data from your application. The database auto-increments this number, so do not try posting the auto sequence number from your script.

If you are sure you have accounted for every column, the next thing to check, is that the data type.

Also check for every column that has been defined on your table as mandatory because this cannot be null. One way to avoid posting null value to your table, is to debug the values on your application to make sure they are present before you post them. Is there a way to turn error reporting on in Adobe Flex?

see also:

Debugging with the web-tier compiler @ http://livedocs.adobe.com/flex/3/html/help.html?content=apache_6.html

Configuring the debugger version of Flash Player @ http://livedocs.adobe.com/flex/3/html/help.html?content=logging_04.html

Working with the debugger versions of Flash Player and AIR @ http://livedocs.adobe.com/flex/3/html/help.html?content=11_Handling_errors_07.html

Debuging Error in AdobeFlex Builder (Windows-7) @ http://forums.adobe.com/message/2863635

Good luck

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

First things first - Preparation We need all the part for this install and it's much nicer to have them all on hand when you need them so here's what's required. Download Eclipse 3.5 32 bit (I like the Classic flavour) from here. (http://www.e…
Applications for our next round of the Experts Exchange Scholarship Contest are starting to roll in. It made us wonder what our past winners are up to these days. Here's a look at what four winners experienced with the contest and what they're doing…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question