Thanks Pavel and Dan, that was the problem. In the past, I've always used a primary key as the parent of a foreign key link so hadn't run into this issue. Pete
On Mon, Apr 2, 2012 at 9:00 AM, <[email protected]> wrote: > Message: 12 > Date: Mon, 02 Apr 2012 15:33:20 +0700 > From: Dan Kennedy <[email protected]> > To: [email protected] > Subject: Re: [sqlite] Foreign Key Problems > Message-ID: <[email protected]> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > On 04/02/2012 07:22 AM, Pete wrote: > > I'm running into an issue with foreign keys where no matter what value I > > supply for a child key, I get a foreign key mismatch error. Here are my > > test tables. > > "foreign key mismatch" indicates a schema problem. Usually a missing > index. See here: > > http://www.sqlite.org/foreignkeys.html#fk_indexes > > It's likely you need to create a UNIQUE index on t1.RefColumn. > -- Pete Molly's Revenge <http://www.mollysrevenge.com> _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

