On Feb 9, 2010, at 12:45 AM, sim wrote:
>
>> That was a posting typo (I pasted the wrong line), the code itself is
>> correct.
>> There is a field calls.customerid
>>
>
> Then it sounds like you are configuring things correctly. I just wanted
> to rule out the most common problems.
>
> Can you log the database calls, and post those that query the calls
> table here? To do this, add the line:
>
> app.DatabaseActivityLog = "/path/to/my/db/logfile"
>
> ... after the line where you create the app object. Make sure that the path
> you use is writable. Run your app again, and do what you described earlier.
> Quit the app, and then open up the log file in a text editor, and find the
> lines that query the calls table.
>
The call to the calls table is simply:
select * from calls
pragma table_info('calls')
Maybe the problem is with the bizobjs, they are very basic:
Calls:
import dabo
from LookupBizobj import LookupBizobj
class CallsBizobj(dabo.biz.dBizobj):
def afterInit(self):
self.DataSource = "calls"
self.KeyField = "callid"
self.UserSQL = "select * from calls"
def getFieldVal(self, field, row):
#Used to get the drop down text for the dropdown in the grid
val=dabo.biz.dBizobj.getFieldVal(self,field,row)
if field=='callresponseid':
app=self.Application
self.Connection = app.getConnectionByName("thedb")
lookups = app.biz.LookupBizobj(self.Connection)
return lookups.getText(val)
else:
return val
def setFieldVal(self, field, value):
# Used to set the key based on the chosen text in the drop down in the grid.
if field=='callresponseid':
app=self.Application
self.Connection = app.getConnectionByName("thedb")
lookups = app.biz.LookupBizobj(self.Connection)
value=lookups.getVal('ACR',value)
return dabo.biz.dBizobj.setFieldVal(self,field,value)
Customers:
import dabo
class CustomerBizobj(dabo.biz.dBizobj):
def afterInit(self):
self.DataSource = "customers"
self.KeyField = "customerid"
self.UserSQL = "select * from customers"
_______________________________________________
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/[email protected]