Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #36861
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <robertkday@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.011 |
| X-Spam-Evidence | '*H*': 0.98; '*S*': 0.00; 'case.': 0.05; 'subject:sqlite3': 0.07; 'python': 0.09; 'cc:addr:python-list': 0.10; 'suggest': 0.11; '(when': 0.16; 'on"': 0.16; 'received:209.85.216.53': 0.16; 'url:sqlite': 0.16; 'variable.': 0.16; 'wrote:': 0.17; 'working.': 0.17; 'sender:addr:gmail.com': 0.18; 'variable': 0.20; 'putting': 0.20; 'keys': 0.22; 'cc:2**0': 0.23; "i've": 0.23; 'seems': 0.23; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'compiled': 0.27; 'message- id:@mail.gmail.com': 0.27; 'mind,': 0.29; "i'm": 0.29; 'worked': 0.30; 'code': 0.31; 'file': 0.32; 'print': 0.32; 'skip:s 30': 0.33; 'curious': 0.33; 'turns': 0.33; 'that,': 0.34; 'received:google.com': 0.34; 'thanks': 0.34; 'open': 0.35; 'received:209.85': 0.35; 'but': 0.36; 'url:org': 0.36; "didn't": 0.36; 'should': 0.36; 'possible': 0.37; 'execute': 0.37; 'does': 0.37; 'why': 0.37; 'received:209': 0.37; 'received:209.85.216': 0.37; 'subject:: ': 0.38; 'object': 0.38; 'sure': 0.38; 'header:Received:5': 0.40; 'skip:u 10': 0.60; 'first': 0.61; 'foreign': 0.72; '2013': 0.84; 'difference.': 0.84; 'can!': 0.91 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=FInk8yeA/KjAAUc5e77LGpWlLUNPdcZWqebxaBG53k4=; b=seoB1QlS8YRtiFvzyDIx06hh9gKoh9eWsyFD9hYj6bWzDTXnAfVb0rYuIkD1ct4OyY 0TQehjHk+VbIQ+YNEQwIThDXYPi0GT9itIIYchyT5KisByBwmjs+JfWap1wxrzp92ZGq j9E1xz28DSIwSn1bAxmMAQOof5XZlcGCazdwrIQHXgbL0bLGq+QUIqP6zaAK3RTLzZwC Inh51gmVmFPtzyuyrfy2fVqwfdys9KI9dII7tFJ8OQgsnZ7+LTUUTFZ/H3UvEHv+7iW/ RW76Bz04LXvmvzPPYcynFZtks/McKALw/DhHFQhZfm7RHJ/xNzc7J3xHlIs8puYo6DAO dCRQ== |
| MIME-Version | 1.0 |
| Sender | robertkday@gmail.com |
| In-Reply-To | <2fce91ea-374c-4f55-9e53-fe4032c2f5fd@googlegroups.com> |
| References | <a8e71415-57fc-4284-82fe-fae0a6670a67@googlegroups.com> <mailman.540.1358260620.2939.python-list@python.org> <2fce91ea-374c-4f55-9e53-fe4032c2f5fd@googlegroups.com> |
| Date | Tue, 15 Jan 2013 17:13:13 +0000 |
| X-Google-Sender-Auth | st95wg2UjEyvj7AeY9jPSdkhiuY |
| Subject | Re: sqlite3 puzzle |
| From | Rob Day <robert.day@merton.oxon.org> |
| To | llanitedave <llanitedave@veawb.coop> |
| Content-Type | text/plain; charset=ISO-8859-1 |
| Cc | python-list <python-list@python.org> |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.544.1358269996.2939.python-list@python.org> (permalink) |
| Lines | 21 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1358269996 news.xs4all.nl 6934 [2001:888:2000:d::a6]:54046 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:36861 |
Show key headers only | View raw
On 15 January 2013 15:51, llanitedave <llanitedave@veawb.coop> wrote:
> Thanks for the suggestion, Rob, but that didn't make any difference. I've never had an issue with putting the execute object into a variable and calling "fetch" on that variable.
>
> I can accept reality if it turns out that foreign keys simply isn't enabled on the Python distribution of sqlite, although I don't know why that should be the case. I'm just curious as to why it worked at first and then stopped working.
Well - you might be able to accept that, but I'm not sure I can! If it
was working before, it must be compiled in, and so it must be possible
to make it work again.
http://www.sqlite.org/foreignkeys.html#fk_enable seems to suggest that
"PRAGMA foreign_keys = ON" never returns anything, and it's only
"PRAGMA foreign_keys" which returns 0, 1 or None (when unsupported).
With that in mind, does the following code work?
# open database file
self.geologger_db = sqlite3.connect('geologger.mgc')
self.db_cursor = self.geologger_db.cursor()
self.db_cursor.execute("PRAGMA foreign_keys = ON")
self.db_cursor.execute("PRAGMA foreign_keys")
print self.db_cursor.fetchone()
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
sqlite3 puzzle llanitedave <llanitedave@veawb.coop> - 2013-01-14 23:09 -0800
Re: sqlite3 puzzle Rob Day <robert.day@merton.oxon.org> - 2013-01-15 14:36 +0000
Re: sqlite3 puzzle llanitedave <llanitedave@veawb.coop> - 2013-01-15 07:51 -0800
Re: sqlite3 puzzle Rob Day <robert.day@merton.oxon.org> - 2013-01-15 17:13 +0000
Re: sqlite3 puzzle llanitedave <llanitedave@veawb.coop> - 2013-01-15 12:29 -0800
Re: sqlite3 puzzle Rob Day <robert.day@merton.oxon.org> - 2013-01-15 22:27 +0000
Re: sqlite3 puzzle llanitedave <llanitedave@veawb.coop> - 2013-01-15 14:46 -0800
Re: sqlite3 puzzle llanitedave <llanitedave@veawb.coop> - 2013-01-15 14:46 -0800
Re: sqlite3 puzzle llanitedave <llanitedave@veawb.coop> - 2013-01-15 12:29 -0800
Re: sqlite3 puzzle llanitedave <llanitedave@veawb.coop> - 2013-01-15 07:51 -0800
Re: sqlite3 puzzle inq1ltd <inq1ltd@inqvista.com> - 2013-01-15 11:54 -0500
csiph-web