BartlebyScrivener wrote: > Whoah. At least I got the connection. I think. Maybe I can figure more > on my own. Any help appreciated. > > Thanks > > --------- > > class Connection: > def __init__(self, aDatasource): > self.db = aDatasource > self.conn = odbc.DriverConnect(self.db) > self.conn.cursor()
This creates a cursor, that's immediatly discarded. > def random_quote(): > """ > Counts all of the quotes in MS Access database Quotations2005.mdb. > Picks one quote at random and displays it using textwrap. > """ > c = Connection('DSN=Quotations') > c.execute ("SELECT COUNT(Quote) FROM PythonQuoteQuery") And this will raise an AttributeError, since your (mostly useless) Connection class doesn't define an 'execute' method. -- bruno desthuilliers python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for p in '[EMAIL PROTECTED]'.split('@')])" -- http://mail.python.org/mailman/listinfo/python-list