On Oct 19, 2007, at 5:52 PM, Eddie wrote:

>
> Hi guys. Thanks for all the help on my previous topic (MS Access
> querying).
>
> I have another new-userish question about mssql. I wrote some working
> code the other day(meaning connection was set up correctly I hope?),
> and it doesn't work anymore today. I tried retracing my steps, but I
> can't seem to find out what I did to break it.
>
> I know having people debug for you is really frowned upon (I hate
> doing it myself), but I've slowly taken code out of my program until
> there's almost nothing left but whats necessary to recreate the
> problem. Whats even worse about it is that SA gives NO error messages.
> I've reduced the initial point of the problem here:
>
> from sqlalchemy import *
>
> class MasterList:
>     def __init__(self):
>         self.dbInit("sa", "pass-word", "127.0.0.1")
>         self.initTables()
>
>     def dbInit(self, user, passwd, location):
>         connectionString = 'mssql://%s:[EMAIL PROTECTED]:1433/ServerMonitor'%
> (user, passwd, location)
>         self.engine = create_engine(connectionString)
>         self.meta = MetaData(self.engine)
>
>     def initTables(self):
>         self.Services =         Table( 'Services', self.meta,
>                                 Column('ID', Integer,
> primary_key=True),
>                                 Column('Name', String(255)),
>                                 )
>         self.meta.create_all(self.engine)
>
> ml = MasterList()
> print "the end"
>
>
> What happens is that it never gets past the create_all statement (no
> the end printed when code executed). No error statements are created.

sounds like something is crashing inside the DBAPI driver.  try  
taking whatever SQL output is printed and trying it manually.

> In the mean time would it be safe to change the connection string to
> an sqlite db and then switch back to ms-sql once it starts working
> again right? The syntax in SA should be the same for everything
> besides the connection string when dealing with table creation, simple
> insertion and "simple" querying?

yup




--~--~---------~--~----~------------~-------~--~----~
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