On Thu, Sep 6, 2012 at 9:37 PM, shaun <shaun.wisema...@gmail.com> wrote: > class StringCall: > results=[] > def databasebatchcall(self,termid, batchid): > con = > cx_Oracle.connect('user/user...@odb4.dcc.company.ie/ODB4TEST.COMPANY.IE') > cur = con.cursor() > cur.execute("SELECT * from name) > results = cur.fetchall()
This actually never sets 'results', which is a class variable. You should probably be using 'self.results' here; Python does not include class/instance members in scope automatically. Try using 'self.' for everything that you need to be maintained as state, and see if that solves your problem. But this looks to me like a case where you may not really even need a class at all. ChrisA -- http://mail.python.org/mailman/listinfo/python-list