[Tutor] Python and database firebird

bob gailer bgailer at gmail.com
Tue Dec 15 18:09:03 CET 2009


Григор wrote:
> Hi
> I have a damaged database and try to fix it.
> How do I delete the bad record.

I think this is a Firebird issue, not something you can address via Python.

> When you run the following code:
> ---------------------------------
> base=connect(dsn=r'C:\python26\vmv.gdb', user='eltrade', 
> password='gdelchev', dialect=1, charset='win1251')
> cur = base.cursor()
> cur.execute('select * from posbills_plu')
> cur.fetchall()
> --------------------------------
> Error is:
> Traceback (most recent call last):
> File "C:\Python26\base.py", line 9, in <module>
> test()
> File "C:\Python26\base.py", line 7, in test
> cur.fetchall()
> ProgrammingError: (-902, 'fetch: \n database file appears corrupt ()\n 
> bad checksum\n checksum error on database page 12839')
>
> -- 
> Криле имат само тия, дето дето сърцето им иска да лети !
> ------------------------------------------------------------------------
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
>   


-- 
Bob Gailer
Chapel Hill NC
919-636-4239


More information about the Tutor mailing list