Ask a Question related to Macromedia Flex General Discussion, Design and Development.
-
EvolvedDSM #1
Having trouble inserting/updating, please look @ code
Hello,
I'm getting an error while trying to insert a record from a form, or update a
record from the datagrid.
ERROR:
[RPC Fault faultString="Error during create: Error Executing Database Query."
faultCode="null" faultDetail="null"]
at
mx.data::ConcreteDataService/http://www.adobe.com/2006/flex/mx/internal::dispatc
hFaultEvent()
at mx.data::CommitResponder/sendCommitEvent()
at mx.data::CommitResponder/sendEvents()
at mx.data::CommitResponder/dispatchFaultEvents()
at mx.data::CommitResponder/result()
at mx.rpc::AsyncRequest/acknowledge()
at NetConnectionMessageResponder/resultHandler()
at mx.messaging::MessageResponder/result()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I'll post more code if needed, but here's my main application code. All CFCs
and .as were generated using the wizard.
CODE:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical"
creationComplete="initApp()">
<mx:Script>
<![CDATA[
import mx.data.DataService;
import mx.collections.ArrayCollection;
import valueObjects.recepLog;
private var ds:DataService;
[Bindable]
private var entries:ArrayCollection;
[Bindable]
private var entry:recepLog;
private function initApp():void{
entries = new ArrayCollection;
ds = new DataService("recep");
ds.fill(entries);
entry = new recepLog;
}
private function selectedEntryHandler(selectedEntry:recepLog):void{
entry = selectedEntry;
}
private function createEntry():void{
entry.clientName = clientNameInput.text;
entry.caseWorker = caseWorkerInput.text;
entry.action = actionInput.text;
ds.createItem(entry);
}
]]>
</mx:Script>
<mx:VBox height="100%" width="100%">
<mx:Panel id="gridPanel" width="100%" layout="absolute" title="Reception
Log">
<mx:DataGrid left="10" right="10" top="10" bottom="10" id="recepdg"
change="selectedEntryHandler(event.target.selected Item)"
dataProvider="{entries}" editable="true">
<mx:columns>
<mx:DataGridColumn id="cnc" headerText="Client Name"
dataField="clientName"/>
<mx:DataGridColumn id="cwc" headerText="Case Worker"
dataField="caseWorker"/>
<mx:DataGridColumn id="ac" headerText="Action" dataField="action"/>
</mx:columns>
</mx:DataGrid>
</mx:Panel>
<mx:Panel width="100%" layout="absolute" title="Enter Information">
<mx:Form bottom="10" right="10" top="10" left="10">
<mx:FormItem label="Client Name">
<mx:TextInput id="clientNameInput" width="280"/>
</mx:FormItem>
<mx:FormItem label="Case Worker">
<mx:TextInput id="caseWorkerInput" width="280"/>
</mx:FormItem>
<mx:FormItem label="Action">
<mx:TextInput width="523" id="actionInput"/>
</mx:FormItem>
<mx:HBox height="100%">
<mx:Button label="Submit" click="createEntry()"/>
</mx:HBox>
</mx:Form>
</mx:Panel>
</mx:VBox>
</mx:Application>
EvolvedDSM Guest
-
Problem inserting/updating records
Hi I'm having trouble trying to insert/update the records in SQL Server. I have created a form based on two tables and created a select... -
Help needed in inserting / updating tables withDreamweaver
Hello. Just registered. I am building an OnLine CD-Shop for a class in college and I have some problems. I'll get right to the point: I am using... -
Inserting and Updating Records at the same time
Hi, Ive created a form which inserts a record into one table within the database, but i also need it to increment a field in another table of the... -
Updating and Inserting simoultaneously
hello not sure if this is possible, i need to update a field in a table and then insert a new record into a different table from when the user... -
Updating/inserting >> Linking table
A dilemma: If I am attempting to add multiple products to an existing Customer-Products linking table do I do this via an Insert or Update? ... -
EvolvedDSM #2
Re: Having trouble inserting/updating, please look @code
I should note that I am using ColdFusion as my database manager.
The weird thing is that I have another app that is working fine and there's
really no difference between the two, other than their databases are slightly
different. I've compared the two side by side and there's really no
difference. Only thing different is that the working database has a mix of
integer and string columns, while the non-working DB has all string type
columns.
I can post more code if anyone is interested in looking.
EvolvedDSM Guest
-
EvolvedDSM #3
Re: Having trouble inserting/updating, please look @code
Sigh, nevermind this thread. I recreated my database and it started working. I don't know what was wrong but it's working now. -_-
EvolvedDSM Guest



Reply With Quote

