Igor,
Well, libversion is 3003006
Ok. Now I'll start looking for a reason I am using an older library...
Thanks,
Shalom
On Thu, Mar 24, 2011 at 3:51 PM, Igor Tandetnik wrote:
> Shalom Elkin wrote:
> > I use 3.7.5 , and Linux (centos).
>
>
Shalom Elkin wrote:
> I use 3.7.5 , and Linux (centos).
Consider using sqlite3_libversion to confirm that. It's possible that more than
one sqlite version is installed on the system, and you are linking to the wrong
one.
Your code looks OK (except that in "pragma
I use 3.7.5 , and Linux (centos).
On Thu, Mar 24, 2011 at 12:56 PM, BareFeetWare wrote:
> On 24/03/2011, at 4:41 PM, Shalom Elkin wrote:
>
> > Sorry - it doesn't work.
> > sqlite3_exec with the pragma directive returns no error, but the
On 24/03/2011, at 4:41 PM, Shalom Elkin wrote:
> Sorry - it doesn't work.
> sqlite3_exec with the pragma directive returns no error, but the program
> still agrees to insert a record that violates foreign_key constraint.
What version of SQLite are you using? I think
I am ready to rebuild sqlite3 with the foreign_key support enabled
as default. to do this, I should UNDEFINE SQLITE_OMIT_FOREIGN_KEY.
I can't find a decent way to do this undef. I use g++ on linux.
Thanks,
Shalom
On Thu, Mar 24, 2011 at 7:41 AM, Shalom Elkin wrote:
>
Sorry - it doesn't work.
sqlite3_exec with the pragma directive returns no error, but the program
still agrees to insert a record that violates foreign_key constraint.
Here is the tables creation
==
CREATE TABLE people(
id integer,
nm text);
INSERT INTO "people"
All,
I have done exactly like BareFeetWare suggested. The referential integrity
"feature" is a no brainer for "serious" systems, where you do care about
your data consistency.
SQL doesn't have clauses where you declare where do you
want Erroneous records to go. This is usually mandated to tools
On 24/03/2011, at 2:50 AM, Shalom Elkin wrote:
> I appreciate the input. Some of the advice comes obviously from very good
> and talented people who find a challenge at doing things WITHOUT reverting
> to code writing.
Doing as much (or most often, all) of the logic in SQL (instead of
On 3/23/2011 11:50 AM, Shalom Elkin wrote:
> what is the API equivalent of
>
> PRAGMA foreign_keys = ON;
It's a SQL statement like any other. You can run it with sqlite3_exec,
for example
--
Igor Tandetnik
___
sqlite-users mailing list
All,
I appreciate the input. Some of the advice comes obviously from very good
and talented people who find a challenge at doing things WITHOUT reverting
to code writing.
I did a small program. Current show -stopper :
what is the API equivalent of
PRAGMA foreign_keys = ON;
If I can not turn
On 23/03/2011, at 9:03 PM, Shalom Elkin wrote:
> I am new to SQLITE. Here's the challenge:
>
> sqlite> .dump
> BEGIN TRANSACTION;
> CREATE TABLE people(
>id integer,
>nm text);
> INSERT INTO "people" VALUES(1,'Jack');
> INSERT INTO "people" VALUES(2,'Jill');
> CREATE TABLE
Thanks, guys. i was afraid of the "Do it yourself". Im doing a small
specialized version, to be generalized later ...
Shalom
On Wed, Mar 23, 2011 at 3:41 PM, Igor Tandetnik wrote:
> On 3/23/2011 8:42 AM, Simon Slavin wrote:
> > On 23 Mar 2011, at 11:27am, Igor Tandetnik
On 3/23/2011 8:42 AM, Simon Slavin wrote:
> On 23 Mar 2011, at 11:27am, Igor Tandetnik wrote:
>> Shalom Elkin wrote:
>>> id 3 doesn't exist, the insertion fails. Now, this was easy. what if
>>> ac.inhad millions of rows? I am looking for some way to get a message
>>> like
On 23 Mar 2011, at 11:27am, Igor Tandetnik wrote:
> Shalom Elkin wrote:
>> id 3 doesn't exist, the insertion fails. Now, this was easy. what if
>> ac.inhad millions of rows? I am looking for some way to get a message
>> like "error
>> in line 3: foreign key mismatch".
>
Shalom Elkin wrote:
> id 3 doesn't exist, the insertion fails. Now, this was easy. what if
> ac.inhad millions of rows? I am looking for some way to get a message
> like "error
> in line 3: foreign key mismatch".
Write a program that parses the file, runs INSERT statement
15 matches
Mail list logo