Dolf, Well, you start my app, I use the normal command from the root folder my app is in:
python start-timesheet.py And here's the model <code> from datetime import datetime from turbogears.database import metadata, mapper # import some basic SQLAlchemy classes for declaring the data model # (see http://www.sqlalchemy.org/docs/04/ormtutorial.html) from sqlalchemy import Table, Column, ForeignKey, Float from sqlalchemy.orm import relation # import some datatypes for table columns from SQLAlchemy # (see http://www.sqlalchemy.org/docs/04/types.html for more) from sqlalchemy import String, Unicode, Integer, DateTime from turbogears import identity timeEntry_table = Table('tbl_TimeEntries', metadata, Column('dateworked', String(10), primary_key=True), Column('empid', Integer, primary_key=True, autoincrement=False), Column('reg', Float), Column('ot', Float), Column('ce', Float), Column('hol', Float), Column('sklv', Float), Column('vac', Float), Column('ct', Float), Column('conv', Float), Column('misc', Float), Column('comments', Unicode(256)) ) class TimeEntry(object): def __init__(self, *args, **kw): for k,v in kw: if hasattr(self, k): attr = getattr(self, k) attr = v mapper(TimeEntry, timeEntry_table) </code> Plus all the generic Identity stuff, which I didn't change whatsoever. I'm not posting it since I didn't change it. If you do need it though, I can put it up. Mike On Feb 22, 11:25 am, SmokeyD <[EMAIL PROTECTED]> wrote: > Mike, > > Post some more info. I have no clue about Microsoft SQL Server (I am > assuming that is what you mean with SQL Server?) but if you post the > model you use and the exact command you use to start the server, maybe > I can help. > Cheers, > > Dolf. > > On Feb 22, 4:39 pm, Mike Driscoll <[EMAIL PROTECTED]> wrote: > > > Hi, > > > I created a new TurboGears skeleton using "tg-admin quickstart myApp -- > > sqlalchemy -i" . I then proceeded to create one new table definition > > in the model.py file (not including the Identity tables) and I pointed > > my database URI to our SQL Server rather than using the default. Now I > > try to start the app, I get the following error: > < Error snipped for brevity > > > For some reason, it keeps trying to re-create all the tables. I've > > deleted them from the server and re-created them successfully using > > "sql create". But if I start the program, the stupid thing tries to re- > > create them AGAIN! This causes the error above (I think). How do I fix > > this? > > > I'm using TurboGears 1.0.4.3 and SA 0.4.2p3 on Windows XP SP2. Thank > > you very much! > > > Mike --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~----------~----~----~----~------~----~------~--~---

