473,425 Members | 1,581 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,425 software developers and data experts.

Insertion (sql) bug in Py2.4 pySQLite 2.2

Hi !

I have this code in my program. Before this I use APSW, but that
project's connection object doesn't have close method...

.... crs.execute(*'''create table files
(*f_id integer not null primary key, f_name varchar(255), f_size long,
f_attr integer, f_crtime varchar(20), f_mdtime varchar(20), f_hash long
)*''') ...
crs=connection.cursor()
crs.execute('insert into files
(f_crtime,f_mdtime,f_attr,f_id,f_hash,f_size,f_nam e)
values(?,?,?,?,?,?,?)',('1','1',1,1,1,1,'a')) ... *

So: I create a table in the first, and later I want to push some
elements to it. Before this example code I use special method to create
insert sql with tuple of values. But everytime it have been failed with
this message: SQL error or inaccessible database. Then I simplified the
code with hand maded SQL. And then I got same error message. The
database file removed and rebuilded with every execution.

When I tired by this error, I returned to APSW, and then I don't got
error messages.

What is the problem in this package ?
http://initd.org/pub/software/pysqli...in32-py2.4.exe
With Py2.3 I use pysqlite package in my CD organizer program, and then I
does not exp. same problems.

Please help me: dd

Apr 8 '06 #1
1 1268

"DurumDara" <du*******@gmail.com> wrote in message news:ma***************************************@pyt hon.org...
I have this code in my program. Before this I use APSW, but that project's connection object doesn't have close method...


The connection object is released when there are no more
references to it, and there are no outstanding cursors.
The existence of the connection object does not hold a
database open. In fact the only thing that holds a
database open is cursors inside a transaction. And if
those exist, calling an explicit close on the connection
object would merely generate an error message that
cursors etc exist.

I recommend reading this document:

http://www.catb.org/~esr/faqs/smart-questions.html

Roger
Apr 8 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Martin Maney | last post by:
Apologies if this isn't news here - I've been too busy this last week or so for even skimming the traffic here, in part because I've been messing around with Ubuntu's preview release on a spare...
1
by: F. GEIGER | last post by:
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:...
4
by: mrstephengross | last post by:
I'd like to do some basic SQL stuff in Python. It seems like there are a heck of a lot of SQL modules for Python. What's the simplest and easiest one to use? Thanks, --Steve...
6
by: Rob Cowie | last post by:
Hi all, I'm having difficulty installing pysqlite 2.1.3 on Mac OS X 10.4.4 There are some notes on the pysqlite wiki regarding modification of the setup.py script and I've followed them to no...
4
by: Andrix | last post by:
Hi, I have a table with 20.000.000 of tuples. I have been monitoring the performance of the insertion and updates, but not convince me at all. The table have 30 columns, what and 12 of it, are...
1
by: Thomas | last post by:
Hi there! Installing TurboGears out-of-the-box (egg-based) on Windows doesn't work because I can't compile the extensions needed for the required pysqlite (also egg- based): Installed...
14
by: Nader Emami | last post by:
I have installed "TurboGears" and I would install 'pysqlite' also. I am a user on a Linux machine. If I try to install the 'pysqlite' with 'easy_install' tool I get the next error message. The...
4
by: Tilman Kispersky | last post by:
I am trying to install sqlite for use with python on cygwin. I have installed the sqlite packages from cygwin (that is libsqlite3-devel and libsqlite3_0). When attempting to easy_install pysqlite...
15
by: Kurda Yon | last post by:
Hi, I try to "build" and "install" pysqlite? After I type "python setup.py build" I get a lot of error messages? The first error is "src/ connection.h:33:21: error: sqlite3.h: No such file or...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.