[Python] Python e ms access
Ciao a tutti, Da varie ricerche in rete ho trovato questa sintassi: s = odbc.odbc('dbodbc') # dbodbc punta al db ms access cur = s.cursor() cur.execute(select * from STORICO where DAT_STOR = ?\ and DAT_STOR = ?\ order by COD_ANAG,DAT_STOR,(self.dtx_reg_ini,self.dtx_reg_fin,)) #questo funziona benissimo #se esiste distrugge la tabella try: cur.execute(DROP TABLE stm) #la cartella la cancella except: print La tabella stm non esiste! cur.execute[CREATE TABLE stm (id INT(2),cod TEXT(10),dattim TEXT(8))] che da questo errore: Traceback (most recent call last): File D:\Python24\WCronos.py, line 172, in OnOkButton cur.execute[CREATE TABLE stm (id INT(2),cod TEXT(10),dattim TEXT(8))] TypeError: unsubscriptable object Il risultato non cambia, non riesco a creare una tabella in un db ms access! -- Best regards, giorgio mailto:g.cl...@tiscali.it ___ Python mailing list Python@lists.python.it http://lists.python.it/mailman/listinfo/python
Re: [Python] Python e ms access
... Traceback (most recent call last): File D:\Python24\WCronos.py, line 172, in OnOkButton cur.execute[CREATE TABLE stm (id INT(2),cod TEXT(10),dattim TEXT(8))] TypeError: unsubscriptable object Il risultato non cambia, non riesco a creare una tabella in un db ms access! ciao, execute è un metodo... perché lo invochi con delle quadre? prova con cur.execute(CREATE TABLE stm (id INT(2),cod TEXT(10),dattimTEXT(8))). saluti -- Antonio Fittipaldi http://www.python-it.org # il punto di riferimento italiano per gli appassionati di Python ___ Python mailing list Python@lists.python.it http://lists.python.it/mailman/listinfo/python
Re: [Python] Python e ms access
On Wednesday 22 April 2009 16:45:58 giorgio wrote: Il risultato non cambia, non riesco a creare una tabella in un db ms access! Di tutta la storia, non ho capito una cosa: perche` usi Access? Enrico ___ Python mailing list Python@lists.python.it http://lists.python.it/mailman/listinfo/python
Re: [Python] Python e ms access
2009/4/22 Enrico 'Henryx' Bianchi henry...@yahoo.it: Il risultato non cambia, non riesco a creare una tabella in un db ms access! Di tutta la storia, non ho capito una cosa: perche` usi Access? uhm... io sarei più interessato sul perchè non dovrebbe usarlo. ciao -- Gian Mario Tagliaretti GNOME Foundation member gia...@gnome.org ___ Python mailing list Python@lists.python.it http://lists.python.it/mailman/listinfo/python