Re: [sqlite] Foreign Key Problems

2012-04-03 Thread Simon Slavin
On 3 Apr 2012, at 5:38pm, Dan Kennedy wrote: > On 04/03/2012 11:18 PM, Pete wrote: >> I am running OS X 10.6.8 and sqlite3 comes with the OS. Does anyone know >> where I can get a version of sqlite3 for OS X that does support foreign >> keys? It would have to be a compiled binary since I don't

Re: [sqlite] Foreign Key Problems

2012-04-03 Thread Dan Kennedy
On 04/03/2012 11:18 PM, Pete wrote: Thanks you SImon. I see this is because the version of sqlite3 I have does not support foreign keys. I am running OS X 10.6.8 and sqlite3 comes with the OS. Does anyone know where I can get a version of sqlite3 for OS X that does support foreign keys? It wo

Re: [sqlite] Foreign Key Problems

2012-04-03 Thread Pete
since I don't access to compilers (or the skills to use them). Thanks, Pete On Tue, Apr 3, 2012 at 9:00 AM, wrote: > Message: 5 > Date: Mon, 2 Apr 2012 17:58:28 +0100 > From: Simon Slavin > To: General Discussion of SQLite Database > Subject: Re: [sqlite] Foreign Key P

Re: [sqlite] Foreign Key Problems

2012-04-02 Thread Pavel Ivanov
ect?  Do all PRAGMA settings work like that? > > Thanks, > > Pete > > On Mon, Apr 2, 2012 at 9:00 AM, wrote: > >> Message: 12 >> Date: Mon, 02 Apr 2012 15:33:20 +0700 >> From: Dan Kennedy >> To: sqlite-users@sqlite.org >> Subject: Re: [sqlite] Forei

Re: [sqlite] Foreign Key Problems

2012-04-02 Thread Simon Slavin
On 2 Apr 2012, at 5:56pm, Pete wrote: > Enabling foreign keys in my application works fine and INSERTs thast > violate a fkey constraint fail. Is this a know problem with sqlite3? I'm > using version 3.6.12 on a Mac. "This document describes the support f

Re: [sqlite] Foreign Key Problems

2012-04-02 Thread Pete
: Dan Kennedy > To: sqlite-users@sqlite.org > Subject: Re: [sqlite] Foreign Key Problems > Message-ID: <4f796450.9030...@gmail.com> > 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 wit

Re: [sqlite] Foreign Key Problems

2012-04-02 Thread Pete
> To: sqlite-users@sqlite.org > Subject: Re: [sqlite] Foreign Key Problems > Message-ID: <4f796450.9030...@gmail.com> > 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 ke

Re: [sqlite] Foreign Key Problems

2012-04-02 Thread Dan Kennedy
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.

Re: [sqlite] Foreign Key Problems

2012-04-01 Thread Pavel Ivanov
> I get a foreign Key mismatch error.  No matter what value I supply for > FKeyColumn, even NULL, I get the same error. Did you create unique index on t1 (RefColumn) ? IIRC, SQLite always fails foreign key check if there's no index on a referenced column. Pavel On Sun, Apr 1, 2012 at 8:22 PM,

[sqlite] Foreign Key Problems

2012-04-01 Thread Pete
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. CREATE TABLE "t1" ("RefColumn" TEXT ,"Data" TEXT ) CREATE TABLE "t2" ("FKeyColumn" TEXT REFERENCES "t1"("RefColumn"),"Data" TEXT ) PRAG

Re: [sqlite] foreign key problems

2009-06-05 Thread Igor Tandetnik
robinsmathew wrote: > hey i hve created a table > CREATE TABLE video_tab (video_id INTEGER, project_id INTEGER, > video_path VARCHAR(100), video_length INTEGER, video_type > VARCHAR(10), video_size VARCHAR(10), CONSTRAINT video_pk PRIMARY > KEY(video_id, project_id), CONSTRAINT fk_project_id FOREI

[sqlite] foreign key problems

2009-06-05 Thread robinsmathew
hey i hve created a table CREATE TABLE video_tab (video_id INTEGER, project_id INTEGER, video_path VARCHAR(100), video_length INTEGER, video_type VARCHAR(10), video_size VARCHAR(10), CONSTRAINT video_pk PRIMARY KEY(video_id, project_id), CONSTRAINT fk_project_id FOREIGN KEY (project_id) REFERENC