logo       


Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

Re: Transaction isolation: msg#00008

Subject: Re: Transaction isolation
Pawel Lewicki pisze:
> Gerhard Häring pisze:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Pawel Lewicki wrote:
>>> Hi,
>>> I tried to find information about my problem but no clear solution so far.
>>> What should I do to keep transactions isolated?
>> That's easy. Use pysqlite2 the standard way and don't try to issue BEGIN,
>> COMMIT or ROLLBACK statements via execute calls.
>>
>> Connections are started implicitly once you execute() a DML (data
>> modification language) command like DELETE, INSERT, UPDATE, REPLACE.
>>
>> To make your data modifications permament, use the .commit() method of the
>> connection object.
>>
>> To throw away the changes of the current transation, use the .rollback()
>> method of the connection object.
>>
>> There are quite a few problems in the following code of yours ...
> 
> Thanks a lot for your comments. I'll try tomorrow updated code.
> I'm really sorry for stupid mistake. I used a snippet from this list as 
> a reference and unintentionally copied its mistakes and added my own. I 
> wanted to show a simple piece of the code to discuss transaction issue, 
> nothing more. Code itself is fine, I just wanted to ask how make sure 
> that the second connection will always query for consistent data (only 
> first connection is modifying anything).
> 
> Pawel Lewicki

Hi,
I tried using

con = sqlite.connect(..., isolation_level=None)

but inserting is incredibly slow and making hard drive busy.

Pawel Lewicki


Ruby Jobs
Java Jobs
Jobs in California
more...
what
job title, keywords
where
city, state, zip
jobs by job search
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
db.firebase.por...    text.xml.xalan....    qnx.openqnx.dev...    user-groups.zar...    internationaliz...    kde.devel.konve...    finance.e-gold....    emacs.latex.pre...    gis.therion/200...    web.webmin.gene...    yellowdog.gener...    vserver/2003-08...    redhat.release....    sysutils.tivoli...    xfree86.expert/...    mail.becky.user...    hardware.netapp...    netbsd.ports.xe...    python.distutil...    boot-loaders.gr...    culture.interne...    java.springfram...    activedir/2006-...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe