Re: [sqlite] Foreign key mismatch Error

2011-10-01 Thread Madhan Kumar
Thank you all for your Reply.. I figured out the problem.. I added constraint for the Primary Key in Employee Table, then it got solved. I have missed to add constraint,, and it was the issue. On Wed, Sep 28, 2011 at 1:41 AM, Kees Nuyt wrote: > On Tue, 27 Sep 2011 14:58:06 +0400, Madhan Ku

Re: [sqlite] Foreign key mismatch Error

2011-09-27 Thread Kees Nuyt
On Tue, 27 Sep 2011 14:58:06 +0400, Madhan Kumar wrote: >Hello.. > In sqlite (version 3.7.7.1), I created two tables with foreign keys >as shown below > >CREATE TABLE [*Employee*] ( > [*EmpId*] INT NOT NULL, > [EmpName] VARCHAR2(50)); > >CREATE TABLE [*Department*] ( > [DeptID] INTEGER N

Re: [sqlite] Foreign key mismatch Error

2011-09-27 Thread Simon Slavin
On 27 Sep 2011, at 11:58am, Madhan Kumar wrote: > In sqlite (version 3.7.7.1), I created two tables with foreign keys > as shown below > > CREATE TABLE [*Employee*] ( > [*EmpId*] INT NOT NULL, > [EmpName] VARCHAR2(50)); > > CREATE TABLE [*Department*] ( > [DeptID] INTEGER NOT NULL, >

[sqlite] Foreign key mismatch Error

2011-09-27 Thread Madhan Kumar
Hello.. In sqlite (version 3.7.7.1), I created two tables with foreign keys as shown below CREATE TABLE [*Employee*] ( [*EmpId*] INT NOT NULL, [EmpName] VARCHAR2(50)); CREATE TABLE [*Department*] ( [DeptID] INTEGER NOT NULL, [DeptName] VARCHAR2(20), [*EmpID*] INTEGER NOT NULL CON

Re: [sqlite] "Foreign key mismatch" error -- possible bug

2010-12-31 Thread Patkó Sándor
bß&r1Cn1 O^f2 .0Cy. . Đ.lat .Q1 .9Č7&8 .Y g. 8c.ki0gnz&lL \yzď8 ^l(R) c \..y0. l+.l0.8ĹÔ1... tOl^5n a.B On 2011.01.01. 6:17, "Kenneth Ballard" wrote: How did I not see that? Thank you for pointing that out. Adding the primary key to T1.f1 solved the problem. It was something so blatantly obvio

Re: [sqlite] "Foreign key mismatch" error -- possible bug

2010-12-31 Thread Kenneth Ballard
How did I not see that? Thank you for pointing that out. Adding the primary key to T1.f1 solved the problem. It was something so blatantly obvious in hindsight. I had primary keys on every other table except that one, but sometimes it's these little things that are the easiest to overlook. Tha

Re: [sqlite] "Foreign key mismatch" error -- possible bug

2010-12-31 Thread Dan Kennedy
On 01/01/2011 11:27 AM, Kenneth Ballard wrote: > I apologize for not providing that initially. Here is the schema for the > three tables: > > CREATE TABLE [T3] ( > [f1] INTEGER NOT NULL CONSTRAINT [fk_T3_T2] REFERENCES [T2]([f1]) ON > DELETE CASCADE, > [f2] INTEGER NOT NULL, > [f3] INTE

Re: [sqlite] "Foreign key mismatch" error -- possible bug

2010-12-31 Thread Kenneth Ballard
I apologize for not providing that initially. Here is the schema for the three tables: CREATE TABLE [T3] ( [f1] INTEGER NOT NULL CONSTRAINT [fk_T3_T2] REFERENCES [T2]([f1]) ON DELETE CASCADE, [f2] INTEGER NOT NULL, [f3] INTEGER NOT NULL, [f4] INTEGER NOT NULL, [f5] INTEGER NOT NUL

Re: [sqlite] "Foreign key mismatch" error -- possible bug

2010-12-31 Thread BareFeetWare
Please post your schema instead of describing it. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] "Foreign key mismatch" error -- possible bug

2010-12-31 Thread Kenneth Ballard
I've spent most of a day trying to figure out what was causing a "foreign key mismatch" error in a truncate-optimized DELETE query. I searched the list and didn't find anything similar to what I've found, nor does there appear to be a bug slip about this either. I'm using version 3.7.4. First

Re: [sqlite] "foreign key mismatch" error

2009-12-04 Thread Paul Shaffer
Original Message > On Dec 4, 2009, at 12:31 PM, Paul Shaffer wrote: > >> Below are 3 tables. When I delete a row in Item with related rows in >> Item_attribute I get the dreaded "foreign key mismatch" error. I've >> read >> through the documentation and don't see what I'm doi

Re: [sqlite] "foreign key mismatch" error

2009-12-03 Thread Dan Kennedy
On Dec 4, 2009, at 12:31 PM, Paul Shaffer wrote: > Below are 3 tables. When I delete a row in Item with related rows in > Item_attribute I get the dreaded "foreign key mismatch" error. I've > read > through the documentation and don't see what I'm doing wrong. There are no FK mismatches in the

[sqlite] "foreign key mismatch" error

2009-12-03 Thread Paul Shaffer
Below are 3 tables. When I delete a row in Item with related rows in Item_attribute I get the dreaded "foreign key mismatch" error. I've read through the documentation and don't see what I'm doing wrong. sqlite v 1.6.20 CREATE TABLE [Item_attribute] ( "ItemID"integer NOT NULL, "At