Hi,

On Fri, Jan 9, 2009 at 12:45 PM, t...@twopeasinabucket.com <
t...@twopeasinabucket.com> wrote:

>
> On Jan 7, 10:41 pm, "Michael Trier" <mtr...@gmail.com> wrote:
> > Hi,
> >
> > On Wed, Jan 7, 2009 at 10:43 PM, Jaimy Azle <jaimy.a...@gmail.com>
> wrote:
> >
> > > Hi,
> >
> > > it seems mssql wrapper for pymmsql DBAPI driver in sqlalchemy 0.5.0
> > > (release) is broken. I haven't check it out with adodbapi, but
> > > pyodbc confirmed works.
> >
>

Work has been hectic this week.  Anyway, I looked into this and pymssql
doesn't support execute on the connection.  It supports a straight up query
at the module level or it supports execute on the cursor.  So our options
are:

1. Override do_begin so that it creates a cursor and then executes on the
cursor:

    def do_begin(self, connection):
        cursor = connection.cursor()
        cursor.execute("SET IMPLICIT_TRANSACTIONS OFF")
        cursor.execute("BEGIN TRANSACTION")

2. Revert to the old behavior by doing:

    def do_begin(self, connection):
        pass

This would only affect pymssql.  Option 2 results in the greatest number of
passed tests for straight orm usage, but causes the ever persistent hanging
when working with transactional tests. This was the reason for the
introduction of those statements (plus visitpoints). I want Mike Bayer to
confirm that's the direction he wants to go in, before I proceed.

I apologize for this oversight. I had a friend test on pymssql but because
of the number of overall failures is much higher I think he missed the fact
that this wasn't working right.

As mentioned previously, pymssql support is no where near the level of
support as pyodbc. In addition the maintainer has not updated this library
for several years. Finally, Microsoft warns against it's use going forward,
"When writing new applications, avoid using DB-Library. When modifying
existing applications, you are strongly encouraged to remove dependencies on
DB-Library. Instead of DB-Library, you can use Microsoft ActiveX(R) Data
Objects (ADO), OLE DB, or ODBC to access data in SQL Server."


Michael Trier
http://blog.michaeltrier.com/

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to