Thanks very much. Most of our tables do have datetime fields. Manish
-----Original Message----- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Joe Mistachkin Sent: Friday, March 30, 2012 9:45 AM To: 'General Discussion of SQLite Database' Subject: Re: [sqlite] Concurrency violation: the UpdateCommand affected 0 of the expected 1 records Agrawal, Manish wrote: > > So my question is: is this a bug or a feature in System.Data.SQLite > The behavior seen here does not originate with System.Data.SQLite. It has to do with how the .NET Framework System.Data.* infrastructure classes (e.g. DbCommandBuilder) build the WHERE clause of the SQL query. There have been several tickets submitted that involved this issue and I have researched the root causes of each. In almost all cases, the issue ended up being that the System.Data.* infrastructure components in the .NET Framework are very sensitive to the exact data types declared in the schema (e.g. INTEGER vs. DOUBLE), even though SQLite itself is loosely typed. System.Data.SQLite attempts to mitigate this impedance mismatch by mapping type names to .NET Framework types and/or to well-known SQL data types. Normally, this works quite well; however, the use of the equality operator by the DbCommandBuilder class to build the WHERE clause seems to cause issues for some data types (e.g. DateTime and Double). I have not yet found a good workaround for these situations since there appears to be no direct way to influence the WHERE clause generated by the DbCommandBuilder class without changing the underlying database schema. -- Joe Mistachkin _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users