473,587 Members | 2,516 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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('in sert into files
(f_crtime,f_mdt ime,f_attr,f_id ,f_hash,f_size, f_name)
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 1273

"DurumDara" <du*******@gmai l.com> wrote in message news:ma******** *************** *************** *@python.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
2475
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 machine... and, of course, spending time on their very busy mailing list. :-) I didn't find any mention of Ubuntu in a quick scan of recent messages,...
1
2807
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: t = time.time() n = len(self) while len(self): del self self.commit()
4
2436
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 (mrstephengross@hotmail.com)
6
4381
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 avail. Build and install appear to go smoothly but attempting to run the tests from the python interpreter fails. Likewise any attempt to utilise...
4
1581
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 calcultated column. The test that i do was this: 1 Insertion with all the columns and calculing the calcultated columns in the insertion sentence.
1
2268
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 c:\programme\python24\lib\site-packages\turbogears-1.0.1- py2.4.egg Processing dependencies for TurboGears>=1.0
14
7140
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 error message is longer than what I send here. % easy_install pysqlite Searching for pysqlite Reading http://cheeseshop.python.org/pypi/pysqlite/...
4
3266
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 I get: $ easy_install pysqlite Searching for pysqlite Reading http://pypi.python.org/simple/pysqlite/ Reading http://pysqlite.org/ Reading...
15
14733
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 directory". So, I assume that the absence of the "sqlite3.h" is the origin of the problem. I found on the web, that this file should be either in...
0
7923
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8349
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7974
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8221
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5719
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3845
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3882
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2364
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1192
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.