it looked so easy...
[EMAIL PROTECTED]:~/dev/apps/uloop$ python test.py
'/usr/lib/python2.4/site-packages/dabo' not versioned, and not exported
Traceback (most recent call last):
File "test.py", line 24, in ?
uLoopBO1.test()
File "test.py", line 18, in test
self.findDBs()
File "test.py", line 11, in findDBs
self.setConnection(ci)
File "/usr/lib/python2.4/site-packages/dabo/biz/dBizobj.py", line 105, in
setConnection
self.createCursor()
File "/usr/lib/python2.4/site-packages/dabo/biz/dBizobj.py", line 152, in
createCursor
self.__cursors[key] = cf.getCursor(cursorClass)
AttributeError: 'dConnectInfo' object has no attribute 'getCursor'
# test.py
import dabo
class uLoopBO(dabo.biz.dBizobj):
def findDBs(self):
ci = dabo.db.dConnectInfo(DbType='mysql',
Host=self.host,
User=self.user,
PlainTextPassword=self.pw )
self.setConnection(ci)
def test(self):
self.host = 'localhost'
self.user = 'testUserA'
self.pw = 'pw'
self.findDBs()
if __name__ == "__main__":
uLoopBO1=uLoopBO()
uLoopBO1.test()
def setConnection(self, conn):
"""Normally connections are established before bizobj
creation, but
for those cases where connections are created later, use this
method to
establish the connection used by the bizobj.
"""
self._cursorFactory = conn
Isn't conn supposed to be a dabo.db.dConnectInfo( ?
Carl K
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/dabo-users/[EMAIL PROTECTED]