Thanks very much for your response. I tried a simple test based on this 
suggestion as follows:

CREATE TABLE "table1" ("field1" INTEGER PRIMARY KEY NOT NULL UNIQUE, "field2" 
INTEGER NOT NULL );
INSERT INTO "table1" VALUES(1, 1);
INSERT INTO "table1" VALUES(2, 2);
INSERT INTO "table1" VALUES(3, 3);
INSERT INTO "table1" VALUES(4, 4);
INSERT INTO "table1" VALUES(5, 5);

The update command generated is:

this._adapter.UpdateCommand.CommandText = "UPDATE 
[main].[sqlite_default_schema].[table1] SET [field1] = @field1, [field2] = 
@field2 WHERE 

        (([field1] = @Original_field1) AND ([field2] = @Original_field2));"

Changing field2 to REAL or TEXT made no difference. The comparison is always 
with both fields.

This is just for information for solution if possible. Fortunately it only 
requires a one-time clean-up after the dataset is created.

Thanks
Manish

-----Original Message-----
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] 
On Behalf Of Simon Slavin
Sent: Friday, March 30, 2012 4:53 PM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] Concurrency violation: the UpdateCommand affected 0 of 
the expected 1 records


On 30 Mar 2012, at 6:27pm, "Agrawal, Manish" <magra...@usf.edu> wrote:

> Thanks very much. Most of our tables do have datetime fields.

Not in SQLite they don't.  There is no such datatype in SQLite.

<http://sqlite.org/datatype3.html>

Find out how you're storing your dates, and declare your fields as INTEGER, 
REAL or TEXT, then your problem will go away.

Simon.
_______________________________________________
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

Reply via email to