Hi Gerhard -
is the download missing? On Pypi I see 2.8.0 is registered but no download
file:
https://pypi.python.org/pypi/pysqlite/2.8.0
pip fails:
$ ./bin/pip install pysqlite==2.8.0 --upgrade --force
Collecting pysqlite==2.8.0
Could not find a version that satisfies the requirement pysql
Yes, I forgot to "setup.py sdist upload". It's fixed now. Sorry for the
trouble.
I'm of course looking forward to hear if SQLAlchemy still works ok with
this release.
On Wed, Aug 19, 2015 at 10:10 PM, wrote:
> Hi Gerhard -
>
> is the download missing? On Pypi I see 2.8.0 is registered but no
>
MRAB wrote:
> I wonder whether it's complaining about the "as count" part because
> "count" is the name of a function, although you do say that the same
> query works elsewhere.
Hey, good catch. Thanks; I'll change that. (It wasn't the problem, but
no doubt someday it could be.)
-Wm
--
http://m
william tanksley wrote:
> Oh, this is Python 2.5 on Windows.
New result: this works on Python 2.6. Obviously the SQLite format
changed between the two runs.
I'll call this "problem solved"; my app appears to run now.
-Wm
--
http://mail.python.org/mailman/listinfo/python-list
william tanksley wrote:
I'm trying to modify an app I wrote a few months ago, but now it dies
on startup (it worked before). The app loads the SQLite Media Monkey
database, and crashes on its first query (when I try to get the number
of podcasts). At the end of this post is a reduced version of t
Edzard Pasma wrote:
> Hello,
>
> It looks that the issue with fetch across rollback still can occur in the new
> version. It turned up when I applied the Pysqlite transaction test suite to
> some dbapi2 version of my own. Below is a minimal script to reproduce it. It
> has puzzled me what goes
Hello,
It looks that the issue with fetch across rollback still can occur in the new
version. It turned up when I applied the Pysqlite transaction test suite to
some dbapi2 version of my own. Below is a minimal script to reproduce it. It
has puzzled me what goes wrong and I would like to believ
klia wrote:
>
> Hey guys;
>
> I am trying to develop a tiny program using python to search inside sqlite
> database with file extension is .db in which the program will ask users to
> enter their search query and base on that it will retrieve the results But
>
> I need the program to have so
klia schrieb:
klia wrote:
Hey guys;
I am trying to develop a tiny program using python to search inside sqlite
database with file extension is .db in which the program will ask users to
enter their search query and base on that it will retrieve the results But
I need the program to have som
2009/2/23 klia
>
>
>
> klia wrote:
> >
> > Hey guys;
> >
> > I am trying to develop a tiny program using python to search inside
> sqlite
> > database with file extension is .db in which the program will ask users
> to
> > enter their search query and base on that it will retrieve the results
>
klia wrote:
>
> Hey guys;
>
> I am trying to develop a tiny program using python to search inside sqlite
> database with file extension is .db in which the program will ask users to
> enter their search query and base on that it will retrieve the results But
>
> I need the program to have so
En Mon, 23 Feb 2009 06:17:41 -0200, klia
escribió:
I need the program to have some smartness in search mechanism in which
the
program will guess that the user is looking for these key words in the
database.
so far i came up with this but the search ain't smart, i have to write
the
full
Geon. wrote:
hi everyone!
when i install pysqlite i meet bellow error. ( use easy_install and
source code building same problem )
ld: Can't find library for -lpython2.5
what mean this message? and what i do?
my system is hp-ux 11i v3. and python2.5 is installed.
ld command also avaliable.
I
On 11월11일, 오후6시10분, Thorsten Kampe <[EMAIL PROTECTED]> wrote:
> * Geon. (Mon, 10 Nov 2008 18:00:56 -0800 (PST))
>
>
>
>
>
> > On 11?10?, ??1?31?, ??? <[EMAIL PROTECTED]> wrote:
> > > On Nov 10, 10:29 am, "Geon." <[EMAIL PROTECTED]> wrote:
> > > > when i install pysqlite i meet bellow error. ( use e
* Geon. (Mon, 10 Nov 2008 18:00:56 -0800 (PST))
> On 11?10?, ??1?31?, ??? <[EMAIL PROTECTED]> wrote:
> > On Nov 10, 10:29 am, "Geon." <[EMAIL PROTECTED]> wrote:
> > > when i install pysqlite i meet bellow error. ( use easy_install and
> > > source code building same problem )
> >
> > > ld: Can't fi
On Mon, Nov 10, 2008 at 9:00 PM, Geon. <[EMAIL PROTECTED]> wrote:
> > Hi, as far as I know.
> >
> > 1. you can use module sqlite3 instead.
> > 2. you can use these commands on ubuntu:
> >
> > sudo apt-get install libsqlite3-dev
> > sudo easy_install -Z pysqlite
>
> is possible apt-get on hp unix?
On 11월10일, 오후1시31분, 一首诗 <[EMAIL PROTECTED]> wrote:
> On Nov 10, 10:29 am, "Geon." <[EMAIL PROTECTED]> wrote:
>
> > hi everyone!
>
> > when i install pysqlite i meet bellow error. ( use easy_install and
> > source code building same problem )
>
> > ld: Can't find library for -lpython2.5
>
> > what m
On 8 Nov, 05:39, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:
> On Fri, 07 Nov 2008 14:36:52 +0100, Gerhard Häring <[EMAIL PROTECTED]>
> declaimed the following in comp.lang.python:
>
> > Astley Le Jasper wrote:
> > > I've been getting errors recently when using pysqlite. I've declared
> > > the ta
On Nov 10, 10:29 am, "Geon." <[EMAIL PROTECTED]> wrote:
> hi everyone!
>
> when i install pysqlite i meet bellow error. ( use easy_install and
> source code building same problem )
>
> ld: Can't find library for -lpython2.5
>
> what mean this message? and what i do?
>
> my system is hp-ux 11i v3. a
On 11월10일, 오전11시29분, "Geon." <[EMAIL PROTECTED]> wrote:
> hi everyone!
>
> when i install pysqlite i meet bellow error. ( use easy_install and
> source code building same problem )
>
> ld: Can't find library for -lpython2.5
>
> what mean this message? and what i do?
>
> my system is hp-ux 11i v3. a
On Sun, Nov 9, 2008 at 9:29 PM, Geon. <[EMAIL PROTECTED]> wrote:
> hi everyone!
>
> when i install pysqlite i meet bellow error. ( use easy_install and
> source code building same problem )
>
> ld: Can't find library for -lpython2.5
>
> what mean this message? and what i do?
>
> my system is hp-ux
Astley Le Jasper wrote:
I've been getting errors recently when using pysqlite. I've declared
the table columns as real numbers to 2 decimal places (I'm dealing
with money),
MySQL doesn't have any MONEY type. All it has is INTEGER, REAL, TEXT,
BLOB and NULL types.
but when doing division on
On Nov 7, 6:36 am, Dan Bishop <[EMAIL PROTECTED]> wrote:
> On Nov 6, 3:46 pm, Astley Le Jasper <[EMAIL PROTECTED]> wrote:
>
> > I've been getting errors recently when using pysqlite. I've declared
> > the table columns as real numbers to 2 decimal places (I'm dealing
> > with money), but when doing
On Nov 6, 3:46 pm, Astley Le Jasper <[EMAIL PROTECTED]> wrote:
> I've been getting errors recently when using pysqlite. I've declared
> the table columns as real numbers to 2 decimal places (I'm dealing
> with money), but when doing division on two numbers that happen to
> have no decimal fractions
Colin Mcphail wrote:
> On 2008-03-09 18:57:00 +, Gerhard Häring <[EMAIL PROTECTED]> said:
>
> Gerhard Häring wrote:
[...] APSW
web:http://oss.itsystementwicklung.de/trac/apsw/
scm:Subversion: http://initd.org/svn/pysqlite/apsw/trunk/
>
> That should have
On 2008-03-09 18:57:00 +, Gerhard Häring <[EMAIL PROTECTED]> said:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Gerhard Häring wrote:
>> [...] APSW
>>
>>
>> web:http://oss.itsystementwicklung.de/trac/apsw/
>> scm:Subversion: http://initd.org/svn/pysqlite/apsw/trunk/
>
In article
<[EMAIL PROTECTED]>Gerhard Häring
<[EMAIL PROTECTED]> wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> Gerhard Häring wrote:
>> [...] APSW
>>
>>
>> web:http://oss.itsystementwicklung.de/trac/apsw/
>> scm:Subversion: http://initd.org/svn/pysqlite/apsw
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Gerhard Häring wrote:
> [...] APSW
>
>
> web:http://oss.itsystementwicklung.de/trac/apsw/
> scm:Subversion: http://initd.org/svn/pysqlite/apsw/trunk/
That should have been http://oss.itsystementwicklung.de/svn/apsw/apsw/
- -- Gerhard
--
mmm wrote:
> Oops I did make a mistake. The code I wanted to test should have been
>
> import copy
> print 'Test 1'
> pf= '?,?,?,?'
> sqlx1= 'INSERT INTO DTABLE2 VALUES ( %s ) ' % pf
> print sqlx1
>
> print
> print 'Test 2'
> sqlx2= copy.copy(sqlx1)
> sqlx3= sqlx1
> pf= '?,?,?, '
> print 'sq
Oops I did make a mistake. The code I wanted to test should have been
import copy
print 'Test 1'
pf= '?,?,?,?'
sqlx1= 'INSERT INTO DTABLE2 VALUES ( %s ) ' % pf
print sqlx1
print
print 'Test 2'
sqlx2= copy.copy(sqlx1)
sqlx3= sqlx1
pf= '?,?,?, '
print 'sqlx1= ', sqlx1
print 'sqlx2= ', sqlx2
pr
Peter Otten wrote:
> Steve Holden wrote:
>
>> What I will repeat, however, is that while there is a *slight*
>> difference is semantics between
>>
>> s = "some string"
>> s1 = s
>>
>> and
>>
>> s = "some string"
>> s1 = copy.copy(s)
>>
>> that difference is only to ensure that s and s1 point to di
Steve Holden wrote:
> What I will repeat, however, is that while there is a *slight*
> difference is semantics between
>
> s = "some string"
> s1 = s
>
> and
>
> s = "some string"
> s1 = copy.copy(s)
>
> that difference is only to ensure that s and s1 point to different
> copies of the same st
mmm wrote:
> Steve, I think you were right the first time is saying
>
>> it should really be this:
>> sqlxb= 'INSERT INTO DTABLE2 VALUES (?, ?, ?, ?)'
>
> my copy.copy() has the equivalent effect.
>
> Running this test code produces the output below
>
> import copy
>
> print 'Test 1'
> pf= '?
Steve, I think you were right the first time is saying
> it should really be this:
> sqlxb= 'INSERT INTO DTABLE2 VALUES (?, ?, ?, ?)'
my copy.copy() has the equivalent effect.
Running this test code produces the output below
import copy
print 'Test 1'
pf= '?,?,?,?'
sqlx1= 'INSERT INTO DTABLE
mmm wrote:
>>> Hence (if I understand python convention), this can be
>>> solved by adding
>>> sqlx= copy.copy(sqlx)
>>> before the looping. And in tests adding this step saved about 5-10% in
>>> time.
>> Now this I don;t really understand at all. What's the point of trying to
>> replace sqlx with
> > Hence (if I understand python convention), this can be
> > solved by adding
> > sqlx= copy.copy(sqlx)
> > before the looping. And in tests adding this step saved about 5-10% in
> > time.
>
> Now this I don;t really understand at all. What's the point of trying to
> replace sqlx with a copy of
[EMAIL PROTECTED] schrieb:
> I hav read on this forum that SQL coding (A) below is preferred over
> (B), but I find (B) is much faster (20-40% faster)
>
> (A)
>
> sqla= 'INSERT INTO DTABLE1 VALUES (%d, %d, %d, %f)' % values
> curs.execute(sqla)
>
> (B)
> pf= '?, ?, ?, ?'
> sql
[EMAIL PROTECTED] wrote:
> Steve, I want to make sure I understand. My test code is below, where
> ph serves as a placeholder. I am preparing for a case where the number
> of ? will be driven by the length of the insert record (dx)
>
> dtable= 'DTABLE3'
> print 'Insert data into table %s, versio
Steve, I want to make sure I understand. My test code is below, where
ph serves as a placeholder. I am preparing for a case where the number
of ? will be driven by the length of the insert record (dx)
dtable= 'DTABLE3'
print 'Insert data into table %s, version #3' % dtable
ph= '?, ?, ?, ?'
sqlx=
[EMAIL PROTECTED] wrote:
>
>I hav read on this forum that SQL coding (A) below is preferred over
>(B), but I find (B) is much faster (20-40% faster)
>
>(A)
>
>sqla= 'INSERT INTO DTABLE1 VALUES (%d, %d, %d, %f)' % values
>curs.execute(sqla)
>
>(B)
> pf= '?, ?, ?, ?'
>sqlxb= 'INSERT
[EMAIL PROTECTED] wrote:
>> (B) is better than (A). The parameter binding employed in (B)
>> is not only faster on many databases, but more secure.
> See, for example,http://informixdb.blogspot.com/2007/07/filling-in-
> blanks.html
>
> Thx. The link was helpful, and I think I have read similar th
> (B) is better than (A). The parameter binding employed in (B)
> is not only faster on many databases, but more secure.
See, for example,http://informixdb.blogspot.com/2007/07/filling-in-
blanks.html
Thx. The link was helpful, and I think I have read similar things
before-- that B is faster.
So
On Thu, 28 Feb 2008 19:35:03 -0800 (PST), mdboldin wrote
> I hav read on this forum that SQL coding (A) below is preferred over
> (B), but I find (B) is much faster (20-40% faster)
>
> (A)
>
> sqla= 'INSERT INTO DTABLE1 VALUES (%d, %d, %d, %f)' % values
> curs.execute(sqla)
>
> (B)
>
Paul McNett wrote:
> Andy Smith wrote:
>
>> Im trying to run a Python based program which uses MySQL with
>> python-sqlite and Im recieving this error,
>>
>> 'Connection' object has no attribute 'autocommit' [...]
No, why should it have one? It's not documented to have one. To do what
you i
Andy Smith wrote:
> Im trying to run a Python based program which uses MySQL with
> python-sqlite and Im recieving this error,
>
> 'Connection' object has no attribute 'autocommit'
>
> I´ve had a google for this and its seems like it may be a bug
> python-sqlite or sqlite bug , but also
Ok, simple fix... Updated to MySQL_python-1.2.2 and all ok now! :D
- Original Message -
From: Andy Smith
To: python-list@python.org
Sent: Monday, February 04, 2008 3:45 PM
Subject: Pysqlite issue no attribute 'autocommit'
Hi there,
Im trying to run a Python based pro
On Tue, 2007-07-31 at 00:13 -0700, 7stud wrote:
> On Jul 30, 6:25 pm, [EMAIL PROTECTED] wrote:
> > I'm trying to store binary data in a sqlite database and call into the
> > db using pysqlite 3.
> > What I've got so far is this:
> >
> > import sqlite
> > con = sqlite.connect(DB_PATH)
> > cur = con.
On Jul 30, 6:25 pm, [EMAIL PROTECTED] wrote:
> I'm trying to store binary data in a sqlite database and call into the
> db using pysqlite 3.
> What I've got so far is this:
>
> import sqlite
> con = sqlite.connect(DB_PATH)
> cur = con.cursor()
> query = """create table t1(
> ID INTEGER
On Tue, 2007-07-31 at 00:25 +, [EMAIL PROTECTED] wrote:
> I'm trying to store binary data in a sqlite database and call into the
> db using pysqlite 3.
> What I've got so far is this:
>
> import sqlite
> con = sqlite.connect(DB_PATH)
> cur = con.cursor()mean
> query = """create table t1(
>
Ranjitha wrote:
> Fredrik Lundh wrote:
>
> > Ranjitha wrote:
> >
> > > I want to store my data in a database on the disk. I also want to be
> > > able to reload the tables into the RAM whenever I have a lot of disk
> > > accesses and commit the changes back to the database.
> >
> > using the cache
Fredrik Lundh wrote:
> Ranjitha wrote:
>
> > I want to store my data in a database on the disk. I also want to be
> > able to reload the tables into the RAM whenever I have a lot of disk
> > accesses and commit the changes back to the database.
>
> using the cache_size and synchronous pragmas sou
Ranjitha wrote:
> I want to store my data in a database on the disk. I also want to be
> able to reload the tables into the RAM whenever I have a lot of disk
> accesses and commit the changes back to the database.
using the cache_size and synchronous pragmas sounds like a better way to
trade rel
Ranjitha wrote:
> Hi all,
>
> I'm relatively new to python and am facing a problem with database
> access
>
> I want to store my data in a database on the disk. I also want to be
> able to reload the tables into the RAM whenever I have a lot of disk
> accesses and commit the changes back to the d
Ranjitha wrote:
> Hi all,
>
> I'm relatively new to python and am facing a problem with database
> access
>
> I want to store my data in a database on the disk. I also want to be
> able to reload the tables into the RAM whenever I have a lot of disk
> accesses and commit the changes back to the d
Ranjitha wrote:
> Hi all,
>
> I'm relatively new to python
And to databases ?
> and am facing a problem with database
> access
>
> I want to store my data in a database on the disk. I also want to be
> able to reload the tables into the RAM whenever I have a lot of disk
> accesses and commit t
Dennis Lee Bieber wrote:
> That is probably the worst way to "fix" the problem -- as in the
> future, you may end up trying that method for something that may need to
> be quoted or escaped.
>
> cur.execute(template, (arg1,) )
>
> allows the DB-API spec to properly convert the argument
rdrink wrote:
> And yes I should prolly move to pysqlite2, but for now I was able to
> fix it this way...
> num = 200
> mess = "INSERT INTO foo (id) VALUES (%s)" % num
> cur.execute(mess)
>
> ... don't know why I didn't think of that last (oh wait, Yes I do...
> because 'last night' was actually
Thanks everyone!
But... RTFM? Ouch. It's not like I don't know what I'm doing :-(
... rather, that I *am* using the older sqlite module
> print sqlite.paramstyle = pyformat
> print sqlite.version = 1.0.1
which does not support the qmark sytax. (and I fell victim of
someone elses tutor
Fredrik Lundh wrote:
> John Machin wrote:
> >> So this has to be something stupidly simple... but for the life of me I
> >> can't see it.
> >
> > With the '?' paramstyle, the 2nd arg to cursor.execute() should be a
> > *sequence* (typically a tuple) of the values that you are inserting.
> >
> > Tt
John Machin wrote:
>> So this has to be something stupidly simple... but for the life of me I
>> can't see it.
>
> With the '?' paramstyle, the 2nd arg to cursor.execute() should be a
> *sequence* (typically a tuple) of the values that you are inserting.
>
> Tty this:
> cur.execute("INSERT INTO foo
rdrink wrote:
> I am just getting into pysqlite (with a fair amount of Python and MySQL
> experience behind me) and have coded a simple test case to try to get
> the hang of things...
> yet have run into a 'stock simple' problem...
>
> I can create a database 'test.db', add a table 'foo' (which BTW
"rdrink" <[EMAIL PROTECTED]> wrote:
>I am just getting into pysqlite (with a fair amount of Python and MySQL
> experience behind me) and have coded a simple test case to try to get
> the hang of things...
>
> yet have run into a 'stock simple' problem...
what does
import sqlite
print sql
rdrink schrieb:
> num = 200
> cur.execute("INSERT INTO foo (id) VALUES (?)", num)
Hi!
``num`` must be an iterable object (tuple, list, ...).
num = (200,)
cur.execute("INSERT INTO foo (id) VALUES (?)", num)
Regards,
Gerold
:-)
--
__
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Gerhard Häring wrote:
> Michael Husmann wrote:
>>> Michael Husmann wrote:
After upgrading from pysqlite 2.0.5 to pysqlite 2.3.0 writing into a
sqlite database increases memory consumption heavily. A similar program
with Ruby and sqlite-r
Michael Husmann wrote:
>> Michael Husmann wrote:
>>> After upgrading from pysqlite 2.0.5 to pysqlite 2.3.0 writing into a
>>> sqlite database increases memory consumption heavily. A similar program
>>> with Ruby and sqlite-ruby 1.1.0 does not affect memory consumption at
>>> all.
>>> [...]
>>> Pyth
Dnia 06/13/2006 09:40 PM, Użytkownik Gerhard Häring napisał:
> I've uploaded a fixed source tarball now.
Thanks!
BTW new packages for Fedora should be available tomorrow on mirrors :)
--
^_*
--
http://mail.python.org/mailman/listinfo/python-list
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Dawid Gajownik wrote:
> Dnia 06/13/2006 08:52 PM, Użytkownik Gerhard Häring napisał:
>
>> pysqlite 2.3.0 released
>
> Great :) I have one more problem, though. It does not compile: [...]
> src/connection.c:31:26: error: sqlitecompat.h: No such file o
Dnia 06/13/2006 08:52 PM, Użytkownik Gerhard Häring napisał:
> pysqlite 2.3.0 released
Great :) I have one more problem, though. It does not compile:
gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -
Kent Johnson <[EMAIL PROTECTED]> writes:
> Kent Johnson wrote:
>> I sent pysqlite-2.0.4.win32-py2.4.exe
>
> Well tried, anyway, someone between OP and me is blocking zip and
> exe attachements.
Good thing too. Please don't send files as attachments in email; it
enables the malware propagation sys
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
abcd wrote:
> anyone have v2.x of pysqlite that I could download? the website is
> down for a hardware upgrade with no date as to when it will be back. [...]
The plan is for the complete upgrade to happen tonight.
- -- Gerhard
-BEGIN PGP SIGNATU
Kent Johnson wrote:
> abcd wrote:
>
anyone have v2.x of pysqlite that I could download? the website is
down for a hardware upgrade with no date as to when it will be back.
>>>
>>I need v 2.x for windows, running python v2.4
>
>
> I sent pysqlite-2.0.4.win32-py2.4.exe
Well tried, a
abcd wrote:
>>>anyone have v2.x of pysqlite that I could download? the website is
>>>down for a hardware upgrade with no date as to when it will be back.
>>>
>>
>
> I need v 2.x for windows, running python v2.4
I sent pysqlite-2.0.4.win32-py2.4.exe
Kent
--
http://mail.python.org/mailman/listin
Dennis Lee Bieber wrote:
> On 27 Mar 2006 10:17:21 -0800, "abcd" <[EMAIL PROTECTED]> declaimed
> the following in comp.lang.python:
>
> > anyone have v2.x of pysqlite that I could download? the website is
> > down for a hardware upgrade with no date as to when it will be back.
> >
> Source o
I tried using the path "c:\ex1.db" and it worked. I was using "ex1.db"
before.
Thanks everyone for the help. This is a great community and maybe next
time I will ask a harder question :)
--
http://mail.python.org/mailman/listinfo/python-list
> bapolis <[EMAIL PROTECTED]> writes:
> con = sqlite.connect(":memory:", detect_types=sqlite.PARSE_COLNAMES)
^^
Did you really intend this? Since you're opening a database in memory, you
will have access to tbl1 only if you create the table after the con
[EMAIL PROTECTED] wrote:
> I'm getting the following error:
>
> pysqlite2.dbapi2.OperationalError: no such table: tbl1
>
> Here's my code:
>
> from pysqlite2 import dbapi2 as sqlite
> con = sqlite.connect(":memory:", detect_types=sqlite.PARSE_COLNAMES)
> cur = con.cursor()
> cur.execute("select *
OK, it's better.
You use relative path to your file 'ex1', are you really sure that you
open the right file and not creating another DB in another path ?
Try to use absolute path (r'c:\temp\ex1').
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED]
| my bad. that was the wrong code, here is my code:
|
| from pysqlite2 import dbapi2 as sqlite
| con = sqlite.connect("ex1")
| cur = con.cursor()
| cur.execute("select * from tbl1")
| print cur.fetchall()
Just a thought... is the file containing
your database called -- exactly
Is it the complete code ?
If so then you have to create the table each time you connect to the
DB.
You use an in-memory DB (":memory:") so all the data of the DB is lost
when you close the connection, including the schema of the DB.
--
http://mail.python.org/mailman/listinfo/python-list
my bad. that was the wrong code, here is my code:
from pysqlite2 import dbapi2 as sqlite
con = sqlite.connect("ex1")
cur = con.cursor()
cur.execute("select * from tbl1")
print cur.fetchall()
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED]
| I'm getting the following error:
|
| pysqlite2.dbapi2.OperationalError: no such table: tbl1
|
| Here's my code:
|
| from pysqlite2 import dbapi2 as sqlite
| con = sqlite.connect(":memory:", detect_types=sqlite.PARSE_COLNAMES)
| cur = con.cursor()
| cur.execute("select * from
On 2005-06-17, rh0dium <[EMAIL PROTECTED]> wrote:
> I am starting to play with pysqlite, and would like to know if there is
> a function to determine if a table exists or not.
sqlite_master has already been mentioned, so I'll point out some useful
pragmas (under "Pragmas to query the database sch
Gerhard Häring wrote:
> Or you can query the sqlite_master table (don't know any specification
> off-hand, but it contains the schema information).
Item #9 in the FAQ (http://www.sqlite.org/faq.html#q9) shows it as:
CREATE TABLE sqlite_master (
type TEXT,
name TEXT,
tbl_name TEXT,
ro
rh0dium wrote:
> Hi all,
>
> I am starting to play with pysqlite, and would like to know if there is
> a function to determine if a table exists or not.
You can try to access the table in a try-catch block, something like:
cur.execute("select * from tablename where 1=2")
and check if it fails.
| I am starting to play with pysqlite,
| and would like to know if there is a function
| to determine if a table exists or not.
rh0dium
One way to get at a list of table names
in an SQLite data base is to query
the sqlite_master table
import sys
import sqlite
this_db = sy
Simply use the internal table SQLite_Master:
select name from SQLite_Master
will return all existing tables.
Regards,
Matthias
--
http://mail.python.org/mailman/listinfo/python-list
F. GEIGER wrote:
> For now, the names of the tables, the app knows of, are added into an
> internal list, when the app is started. Then, when queries fail, the app
> knoes that it has to create them.
>
> It would be nice somehow to be able to ask the database what tables it
> contains. Is anyone d
F. GEIGER wrote:
>
> It would be nice somehow to be able to ask the database what tables it
> contains. Is anyone doing this that way? How do you do that?
>
Information can be found in "Information_Schema_TABLES"
See:
http://www.sqlite.org/cvstrac/wiki?p=InformationSchema
--
http://mail.python.o
"Gerhard Haering" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
I've completely rewritten the db handling stuff, which formerly did too much
behind the scenes (explicit is better than implicit...). Now everything
looks much better. No unexpected errors and - most important - l
On Fri, May 20, 2005 at 08:42:54AM +0200, F. GEIGER wrote:
> In my wxPython-app a part of it gathers data, when a button is pressed, and
> stores it into a db.
>
> The GUI part should display the stuff being stored in the db.
>
> When both parts work on the same connection, I get "SQL statements
On Wed, May 18, 2005 at 09:41:39PM +0200, F. GEIGER wrote:
> I've troubles to let my app take off using pysqlite.
>
> What I wonder most for now is that "pysqlite2.dbapi2.OperationalError:
> cannot commit transaction - SQL statements in progress" when I do this:
>
Urgh! I would have preferred si
Hello Again,
It may be cleaner if I reduce the code:
def PARSE2DB(data,tablename):
i = 0
cadu = GETdb().cursor()
FacetNum = len(data [1])
while i < FacetNum:
cadu.execute("""
insert into table = 'tablename'
( V1_x, V1_y, V1_z)
values(%f, %f, %f)
92 matches
Mail list logo