RecordField type="date" in coolite 0.8

  1. #1

    RecordField type="date" in coolite 0.8

    Hi,

    from 0.8 coolite version, there is a problem with the date recordfields.

    When I do the Coolite.Ext.Web.ChangeRecords Method:

    ChangeRecords<USERS> lstUsers = e.DataHandler.ObjectData<USERS>();
    and the date of the store is null value he throws a Exception:

    Exception was unhandled by user code
    
    Could not cast or convert from System.Int64 to System.Nullable`1[System.DateTime].
    This don't pass with coolite 0.7.
  2. #2

    RE: RecordField type="date" in coolite 0.8

    I Have the same bug with Boolean Fields, but is not a problem for me.

    You cannot solve this bug?
  3. #3

    RE: RecordField type="date" in coolite 0.8

    Hi,

    Can you show example which we can test?
  4. #4

    RE: RecordField type="date" in coolite 0.8

    I am also having the same issue in 0.8

    Could not cast or convert from System.String to System.DateTime

    Dim json As String = e.DataHandler.JsonData
    Dim dataHandler As StoreDataHandler = New StoreDataHandler(json)
    Dim data As ChangeRecords(Of MinQualification) = dataHandler.ObjectData(Of MinQualification)()

  5. #5

    RE: RecordField type="date" in coolite 0.8

    Hi guys,

    We need a sample which reproduces the problem
  6. #6

    RE: RecordField type="date" in coolite 0.8

    I have found that if you bind a Store's DataSource to a DataSet that has rows that contain NULL data then an error is also thrown.
  7. #7

    RE: RecordField type="date" in coolite 0.8

    I've got it working with VB.NET, but I'm guessing you're dealing with C#? You can use Rocky Lhotka's CSLA.NET (SafeDataReader class) in C# to ensure type safety of all fields coming back from whatever database.
  8. #8

    RE: RecordField type="date" in coolite 0.8

    I am working with C# yes. However, having had a quick look at the class I'm not sure it would always be suitable, for instance GetBoolean() returns false in the case of a DBNull which would render the equivelent of a false value into the gridpanel whereas I would like to see an empty cell.
  9. #9

    RE: RecordField type="date" in coolite 0.8

    I have the same problem.
    To reproduce this problem is simple.
    Only create a Dataset and add a datatable that contains a column with NullValues.
    When you want to bind this dataset to a Store. Crash. because the Store Not handle Null values.

    I added two Images for an Idea.

    Only Try to databind an Store to This datataBle and Crash.

    Any Help...!

    Thaks.

    Atte: Gustavo Montero g.

Similar Threads

  1. [CLOSED] RecordField of type Int problem
    By vadym.f in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Aug 14, 2012, 7:58 PM
  2. [CLOSED] Default date format for Type="Date" RecordField
    By r_honey in forum 1.x Legacy Premium Help
    Replies: 12
    Last Post: May 29, 2012, 3:16 PM
  3. Replies: 4
    Last Post: May 22, 2012, 10:40 AM
  4. [CLOSED] RecordField type "Float"
    By egodoy in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Nov 12, 2009, 8:25 PM
  5. [CLOSED] RecordField Enum data type
    By methode in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: May 05, 2009, 2:06 PM

Posting Permissions