dabo Commit
Revision 5179
Date: 2009-04-15 04:03:10 -0700 (Wed, 15 Apr 2009)
Author: Pedro.Gato
Trac: http://trac.dabodev.com/changeset/5179
Changed:
U trunk/dabo/db/dbMsSQL.py
Log:
MSSQL support was not working with latest pymssql version, cursors must be
created with connection._cnx as argument, not connection
Diff:
Modified: trunk/dabo/db/dbMsSQL.py
===================================================================
--- trunk/dabo/db/dbMsSQL.py 2009-04-12 21:16:02 UTC (rev 5178)
+++ trunk/dabo/db/dbMsSQL.py 2009-04-15 11:03:10 UTC (rev 5179)
@@ -29,7 +29,7 @@
user = connectInfo.User
password = connectInfo.revealPW()
database = connectInfo.Database
-
+
# hack to make this work. I am sure there is a better way.
self.database = database
@@ -42,12 +42,16 @@
"""Currently this is not working completely"""
import pymssql
class conCursor(pymssql.pymssqlCursor):
+ def __init__(self, src):
+ self.super(src._cnx)
+
def _getconn(self):
return self.__source
# pymssql doesn't supply this optional dbapi attribute,
so create it here.
connection = property(_getconn, None, None)
return conCursor
#return cursors.Connection.cursor
+ #return self._connection.cursor()
def escQuote(self, val):
@@ -64,7 +68,10 @@
val = self._stringify(val)
return "%s%s%s" % (sqt, val, sqt)
-
+
+ #def getCursor(self, cursorClass):
+ # return self._connection.cursor()
+
def getTables(self, cursor, includeSystemTables=False):
# jfcs 11/01/06 assumed public schema
# cfk: this worries me: how does it know what db is being used?
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message:
http://leafe.com/archives/byMID/[email protected]