Having trouble inserting/updating, please look @ code

Ask a Question related to Macromedia Flex General Discussion, Design and Development.

  1. #1

    Default 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

  2. Similar Questions and Discussions

    1. 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...
    2. 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...
    3. 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...
    4. 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...
    5. 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? ...
  3. #2

    Default 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

  4. #3

    Default 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

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139