Expand my Community achievements bar.

SQLassembler does not handle NULLS in date type well

Avatar

Level 1

I am having problems with SQLassembler and dates.

When I update a entry in a table that has a Date item that is "NULL", the SQL assembler appears to ignore the #date_item# and an error occures..

---

[LCDS]12:13:46.999 [DEBUG] [Service.Data.SQL] SQL Assembler jdbc exception on operation=update-item error=java.sql.SQLException: No value specified for parameter 8

---

This error does not happen is the item has a valid date.

Now, this led me to look at..

---

[LCDS]12:13:47.030 [ERROR] [Message.General] Exception when invoking service 'data-service': flex.data.adapters.AdapterException: An error executing SQL caused the operation to fail. If debug level logging is enabled for the SQL Assembler, details are logged on the server.

  incomingMessage: Flex Message (flex.data.messages.DataMessageExt)

    operation = transacted

    id = null

    clientId = F8ED2FA3-2CBB-2828-A722-E1B0BD29F922

    correlationId =

    destination = sql-crm_item

    messageId = 1B3E8755-CAB2-7C8F-53BC-E1B11358DC1B

    timestamp = 1245032026968

    timeToLive = 0

    body =

    [

      Flex Message (flex.data.messages.DataMessage)

          operation = update

          id = ASObject(11380629){keyfield=542}

          clientId = F8ED2FA3-2CBB-2828-A722-E1B0BD29F922

          correlationId = 1B3E8755-CAB2-7C8F-53BC-E1B11358DC1B

          destination = sql-crm_item

          messageId = 17D39013-4D11-DFEF-5B30-E1B11358E3EB

          timestamp = 1245032026984

          timeToLive = 0

          body =

          [

            [

              note

            ],

            [Proxy(inst=ASObject(30886915){assign_to=jamieg, recordtype= , due_date=null, actiontype= , date_completed=null, username=jamieg, lookupkey=NetworkMonitor_08000, date_time=Fri Jun 12 18:25:41 EST 2009, keyfield=542, note=you too  34, progress_state=Not Started}) proxyClass=class flex.messaging.io.MapProxy descriptor=[ excludes: null]],

            [Proxy(inst=ASObject(10018056){assign_to=jamieg, recordtype= , due_date=null, actiontype= , date_completed=null, username=jamieg, lookupkey=NetworkMonitor_08000, date_time=Fri Jun 12 18:25:41 EST 2009, keyfield=542, note=you too  345, progress_state=Not Started}) proxyClass=class flex.messaging.io.MapProxy descriptor=[ excludes: null]]

          ]

          hdr(DSEndpoint) = my-rtmp

          hdr(DSId) = B8004617-F61C-8D57-9861-6C965736D87D

    ]

    hdr(DSEndpoint) = my-rtmp

    hdr(DSId) = B8004617-F61C-8D57-9861-6C965736D87D

---

See the"descriptor=[ excludes: null]]" part..  Seems to indicate that, because the item is NULL, it is not available to the SQLassembler, so when it is listed on the sql-update as #date_item#, there is no item in the object to pull this from, and I end up in an error.

This is what I think is happening...  So I looked for a way to disable descriptor=[ excludes: null]]...  No idea.

Any clues on this would be great..

Thanks,

James

0 Replies