> Prima facie, I have no idea why this should be acting this way. You listed
> the SQL as seen through profiler, what did you get for statement echos from
> the "echo=True" on your engine -- does the query appear there?
Yes, the query does appear there when echoed. I can take this query
and paste it into a sql management studio and it runs fine. I can
also take the generated query and use pyodbc to execute the query. In
addition I just tested running the generated query using the sql
alchemy engine.execute() method and it runs fine.
> any kind of encoding issue would raise an error immediately. You need
> to do some more experimentation, and or produce a more complete test
> case illustrating the behavior you're seeing for us to have any
> further insight. Experiments include: what happens if you execute a
> plain string with the engine , i.e. engine.execute("insert into table
> values (:foo)", foo='bar') ? try it with unicode bind params ? what
at your suggestion I tried executing this with the builtin
engine.execute() method and it seems to work fine. That surprises me.
the table I have defined is just a test table with one String()
column. I am not trying to use any unicode bind params. It just
seems to me that since the query string is what gets lost or mangled
it is some type of character encoding mismatch but I submit I know
very little about unicode. Nevertheless I will test unicode params
tomorrow and post results.
> happens if you execute against a sqlite database instead of MSSQL?
i will do further testing against sqlite tomorrow but an initial test
a few days ago let me run the create_all() method. It did throw an
error when I tried to specify a schema, something like database not
found. I will post more when I have it.
> what happens if you purposefully use a nonexistent column name with
> the insert().execute() parameters ? are you squashing errors within a
Using a nonexistent column name curiously produces no errors and
runs. The output (when echo=True for the engine) and the trace are a
bit different though. It produces a query that specifies no columns
or parameters. The profiler just shows a series of commits / empty
strings / roll backs being processed.
> try/except ? etc.
not currently squashing any errors inside a try/except
Thanks for the assistance and time.