[EMAIL PROTECTED] | Sent: 27 July 2006 15:01 | To: python-list@python.org | Subject: Re: pysqlite2 fetching from select different than pysqlite? | | Thanks Tim! That works well. As a followup, is there a standard | compliant way to ask what fields are in the table? | | -kurt
Assuming this is what you meant, look at: http://sqlite.org/pragma.html specifically at PRAGMA table_info So, in python: <python> from pysqlite2 import dbapi2 as sqlite db = sqlite.connect (":memory:") db.row_factory = sqlite.Row db.execute ("CREATE TABLE x (i INTEGER, code VARCHAR (10), name VARCHAR (60))") for row in db.execute ("PRAGMA TABLE_INFO ('x')"): print row['name'], row['type'] </python> TJG ________________________________________________________________________ This e-mail has been scanned for all viruses by Star. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________ -- http://mail.python.org/mailman/listinfo/python-list