On 25 Jul 2009, at 03:17, mtrier wrote: > On Jul 23, 8:30 am, Ed Singleton <[email protected]> wrote: >> I've managed to get SA (0.6 branch) and pyodbc connecting to anMSSQL >> db on Mac OS X, but I've recently been trying to get it working on >> linux (Debian Lenny) and have been hitting some problems. >> >> It's definitely working to some degree. Adding "TDS_Version = 8.0" >> to >> my odbc.ini fixed some unicode problems, and so now simple pyodbc >> stuff seems to work. Querying seems to be fine, but sometimes adding >> lots of data using the orm fails with the message: DBAPIError: >> (Error) >> ('HY000', 'The driver did not supply an error!') >> >> The same error occurs in both SA 0.5.5 and SA 0.6 >> >> I'm going to try a few more things to narrow down a bit more where >> the >> problem is, but if any has any ideas of what it could be or how I >> could debug it, I'd be very grateful. > > Any luck on this? I'm using both with OSX and Ubuntu without > differences in behavior. Do you have an isolated test case that > duplicates this behavior?
I don't yet have an isolated test case that causes the same error, but I do now have an isolated test case that doesn't work, and that I'd like to get working. There's two attached files with reasonably simple cases in. The first, simple_thing.py contains a single example. I've tried tweaking various things in it to various effect. The second, complex_thing.py, contains a test generator that generates 64 tests (for now), testing all the different combinations of things that might affect the success of the test. This one also clearly shows the difference between Mac and Linux on my setup, as on the Mac several of the 'non_ascii£' tests pass. Note that it isn't expected for all the tests to pass. Some of the combinations are wrong. It just shows what works and what doesn't. On both the Mac and Linux, my setup is happy with some unicode queries and/or params. Sometimes it will raise a warning if you are inserting unicode into a non-unicode field, and sometimes it will fail for the same reason. What I'm trying to achieve is: 1) Ability to insert non-ascii chars into the db on Linux 2) The above but for all column types (varchar, text, nvarchar, ntext) Absolutely any ideas will be appreciated. I'm not sure what to try next. For now I'm going to document how I set up Linux. Thanks Ed --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
