did you heard about sqlobject ?
give a try...http://www.sqlobject.org/
Ced.
--
Cedric BRINER
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Stupid me, you're right.
Thanks Danny
Bernard
On 7/19/05, Danny Yoo <[EMAIL PROTECTED]> wrote:
>
>
> On Tue, 19 Jul 2005, Bernard Lebel wrote:
>
> > Ah yeah I to mention that I indeed tried fetchall(), but Python would
> > raise an attribute error:
>
> Hi Bernard,
>
> The cursor itself
On Tue, 19 Jul 2005, Bernard Lebel wrote:
> Ah yeah I to mention that I indeed tried fetchall(), but Python would
> raise an attribute error:
Hi Bernard,
The cursor itself holds some internal state that mutates when we call
cursor.execute(). So we use cursor.execute() often for it's side-effe
Ah yeah I to mention that I indeed tried fetchall(), but Python would
raise an attribute error:
def getTableColumns( sTableName ):
""" Lists and returns the list of columns from a given table. """
oConnection = connect2db()
oCursor = oConnection.cursor()
> oResult = oCursor.execute( "SHOW COLUMNS FROM " + sTableName + "" )
Hi Bernard,
Try using oCursor.fetchall() after the execution. The return value of
execute() are the number of rows affected, and you can then pull each
fetched value by using either oCursor.fetchone() or oCursor.fetchall