ok but if I put the "begin" before query me it says:
DatabaseError: cannot start a transaction within a transaction
if I do not put it the "begin", it makes the query correctly me but it gives back the following
message to me:
Exception _sqlite.DatabaseError: 'cannot rollback - no transaction is active' in <bound method Connection.__del__ of <sqlite.main.Connection instance at 0x01CD5A58>> ignored
if instead it does not put not even "commit" the operations nonm they come truly carried out on the database!!?
........what I must make then?
Dan Kennedy ha scritto:
This is just a guess.
SQLite has no implicit transaction like Oracle and some other systems. So to do the 'commit', you have to first do 'begin'. Otherwise each SQL command is in it's own little transaction, automatically committed.
Dan.
--- SKORPIO-INFO <[EMAIL PROTECTED]> wrote:
ah!! opsss ..... this is the query
# Esecuzione delle modifiche selezionate def ExecuteMixChange(self, event): # Effettuo la connessione al database DATABASE = sqlite.connect('CF_BSS.db') # Assegnazione del cursore DB_BSS = DATABASE.cursor()
for x in self.QUERY_MIX:
query_command = self.QUERY_MIX[x] ####<<<=== questo � un dizionario che contiene le query che ho raccolto e che faccio fare tutte insieme cliccando il pulsante di applicazuione modifiche :):)
DB_BSS.execute( query_command ) print query_command
# Effettuo la conferma delle query eseguite
DB_BSS.execute('commit') ###<<<=== questo � il commit che do io .....� sbagliato??? ... non mi sembra per� ??
# Effettuo la chiusura della connessione al database
DB_BSS.close()
# Messaggio di avviso per il riavvio del programma
all_function.WindowMessageInfo("info", FILE_LINGUA, 1002, self)
hi!!
SKORPIO-INFO ha scritto:
hi!! sorry fo my english.....
UPDATE mission_name SET ability = '0' WHERE id_mission = '1'
why if I make this query me it goes to good aim but it gives back this
error to me?
-------------------------------------------------------------------
Exception _sqlite.DatabaseError: 'cannot rollback - no transaction is active' in <bound method Connection.__del__ of <sqlite.main.Connection instance at 0x01CC6B48>> ignored
-------------------------------------------------------------------
the table is this:
create table mission_name(id_mission integer(11) primary key, name_mission varchar(40), ability varchar(2))
an insertion:
insert into mission_name(id_mission, name_mission, ability) values(\'1\', \'ACQUARIUS\', \'1\')
thanks!! :)
__________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/

