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

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

Re: [sqlite] Foreign Key Problems

2012-04-03 Thread Pete
SQLite Database <sqlite-users@sqlite.org> > Subject: Re: [sqlite] Foreign Key Problems > Message-ID: <922a3407-7604-4f64-87bc-07221c066...@bigfraud.org> > Content-Type: text/plain; charset=us-ascii > > > On 2 Apr 2012, at 5:56pm, Pete <p...@mollysrevenge.com> wro

Re: [sqlite] Foreign Key Problems

2012-04-02 Thread Pavel Ivanov
 Is > that correct?  Do all PRAGMA settings work like that? > > Thanks, > > Pete > > On Mon, Apr 2, 2012 at 9:00 AM, <sqlite-users-requ...@sqlite.org> wrote: > >> Message: 12 >> Date: Mon, 02 Apr 2012 15:33:20 +0700 >> From: Dan Kennedy <danielk1...

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

Re: [sqlite] Foreign Key Problems

2012-04-02 Thread Pete
:33:20 +0700 > From: Dan Kennedy <danielk1...@gmail.com> > 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,

Re: [sqlite] Foreign Key Problems

2012-04-02 Thread Pete
+0700 > From: Dan Kennedy <danielk1...@gmail.com> > 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 wrot

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:

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 )

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

[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)