On Apr 17, 2009, at 5:46 PM, Michael Mileusnich  
<[email protected]> wrote:

> First, thanks for being patient and assisting me.  I am very thankful.
>
> MS SQL 2005 is the db I am running.
>
> part of my db.py script:
>
> try:
>     connection = config.get("db", "connection")
> except:
>     print "No Database Specified"
>     sys.exit(1)
>
> engine = create_engine(connection)
>
> metadata = MetaData(engine)
>
> Session = scoped_session(sessionmaker(bind=engine, autoflush=False,  
> autocommit=True))
>
> action_table = Table(
>         'ACTIONS', metadata,
>         Column('ACTIONID', String(48), primary_key=True),
>         Column('TITLE', String(128)),
>         Column('CMDLINE', String(512)),
>         Column('STDIN', Text),
>         Column('STARTINDIR', String(512)),
>         Column('PRIO', Integer),
>         Column('USERID', Integer, ForeignKey('USERS.USERID')))
>
> ...
> more tables here
> ...
> etc
>
> mapper(action, action_table)
>
> here is my create:
>
> new_action = action(ACTIONID = '500', CMDLINE = 'sol')
> session.add(new_action)
> session.flush()
>
> also how do I turn on echo?
>
> On Fri, Apr 17, 2009 at 3:24 PM, Michael Trier <[email protected]>  
> wrote:
> On Fri, Apr 17, 2009 at 2:01 AM, Michael Mileusnich <[email protected] 
> > wrote:
> I am still having issues with pyodbc on Python 2.6.
>
> Platform: Windows XP SP3 32 bit
> Python 2.6
> SQLAlchemy 0.5.3
> pyodbc 2.1.3
>
> I run this exact setup without problems. Maybe if we see the script  
> that will help.  What version of MSSQL?
> -- 
> Michael Trier
> http://blog.michaeltrier.com/
> http://thisweekindjango.

engine = create_engine(connection, echo=True)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" 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/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to