Well, I'm stumped about the connection. It is a MS SQL database. I have
no problems connecting from other apps.
Here is the connect string:
     sqlobject.dburi="mssql://[EMAIL PROTECTED]:1078/ARsystem"
The user does not use a password.


Here is my model:
from sqlobject import *

class HPD_HelpDesk(SQLObject):

   Case_ID_=IntCol(alternateID=True)
   priority = IntCol()
   Create_Time = DateTimeCol()
   Resolved_Time  = DateTimeCol()
   Hours_to_Resolve = IntCol()
   Assigned_To_Group_ = StringCol()



   def _get_priority_text(self):
        return ['Low', 'Medium', 'High', 'Urgent'][self.priority]




And here is my controller:
import turbogears
from turbogears import controllers

from model import HPD_HelpDesk


class Root(controllers.Root):
    @turbogears.expose(html="tt_reports.templates.welcome")
    def index(self):
        #results = [ticket.priority for ticket in
HPD_HelpDesk.select()]
        #results=list(HPD_HelpDesk.select())
        results = list(HPD_HelpDesk.select(HPD_HelpDesk.q.priority==1))
        return dict(results=results)
    


Thanks with your help on this. 

-Don

Reply via email to