in

System.Data.SQLite

An open source ADO.NET provider for the SQLite database engine

Concurrency errors on datatime column

Last post 02-22-2010 8:41 AM by glennwelker. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 02-22-2010 7:27 AM

    Concurrency errors on datatime column

    If I include a column in my dataset that I have defined as a datetime data type, I eventually get concurrency errors from the datagridview.

    The dataset includes as I mentioned a datetime data type.

    The grid is bound via the usual tableadapter and bindingsource.

    The grid allows deletes. When the delete occurs, I try to update the database in the rowdeleted event. Calling the normal tableadapter.update(dataset.table) causes a concurrency error.In looking at the data both original and modified via the dataset, it looks identical.

    This particular application is only used in a single user environment. The error does not occur if the datetime column is not included in the dataset.

    Can anyone recommend a solution? Should I be modifying the date value in some way. Should I abandon the datetime datatype in leui of a text datatype since SQLite doesn't really support a datetime data type? Any recommendation are appreciated.

  • 02-22-2010 8:33 AM In reply to

    Re: Concurrency errors on datatime column

     followup. It has nothing to do with the datagridview. If I delete directly from the dataset itself, I still get the same concurrency error.

  • 02-22-2010 8:41 AM In reply to

    Re: Concurrency errors on datatime column

    Answer

     Nothing like solving your own problems.

     Essentially, if the datetime column holds anything other than a date in ISO8601 format, it will fail. If the date value is properly formatted then the dataset updates correctly.

Page 1 of 1 (3 items)
Powered by Community Server (Commercial Edition), by Telligent Systems