Jason, As I think I stated, I did get the sql create command to work, but I had to delete some of the identity tables that were already there. If I do the sql create with the table in SQL Server, I receive the same error.
I used the shell to do a query on the table I created: tbl_TimeEntries, and it worked. So I think my connection string is good. I'll have a look at SQL's error logs on Monday when I'm back at work. Maybe I'll just re-delete the ID tables a second time and give it another go as well. This is weird stuff. It should "just work". Mike On Feb 23, 9:05 am, sevenseeker <[EMAIL PROTECTED]> wrote: > I use Elixir, but will try to help you out. > > First of all, did you create your database using: > tg-admin sql create > > Do you get the same error then? > > Also, the exception says, "Check messages from the SQL Server. " which > you may indeed want to check the error on the SQL Server side. > > It complains of a bad connection and perhaps you should first try > connecting from the interactive prompt to check that your connection > string is good and the connection from it is good. Also make sure to > first create a catalog/database (which you would do before tg-admin > sql create). > > Just some basic steps that you may have already done, but it doesn't > hurt to check. :) > > Jason > > On Feb 22, 12:15 pm, Mike Driscoll <[EMAIL PROTECTED]> wrote: > > > 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 > > # (seehttp://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 > > # (seehttp://www.sqlalchemy.org/docs/04/types.htmlformore) > > 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 -~----------~----~----~----~------~----~------~--~---

