|
From: Aaron B. <Aar...@da...> - 2006-10-24 17:00:31
|
Would anyone know if the sybase adapter for SO is targeted specifically
at the Sybase ASE product?
I am running Sybase ASA 9.02 which is a different product, but I can use
the same python sybase driver with freetds to talk to my database.
I was able to create a table using the Person example from the
documentation, but inserting a row causes an error and I believe it is
because the system tables are different between ASA and ASE.
I have looked at the sybaseconnection.py and there isn't that much SQL
code in it, so my thoughts to just replace the SQL in there with what
works for ASA and I should be good, right?
Can I create a new directory under the sqlObject install and call it
sybaseasa and then use a URI like 'sybaseasa://...' for my connection hub?
Any pointers on what the different def's are supposed to do in the
sybaseconnection.py?
Right now _hasIdentity is bombing on me:
HAS_IDENTITY = """
SELECT col.name, col.status, obj.name
FROM syscolumns col
JOIN sysobjects obj
ON obj.id = col.id
WHERE obj.name = '%s'
AND (col.status & 0x80) = 0x80
"""
def _hasIdentity(self, conn, table):
query = self.HAS_IDENTITY % table
c = conn.cursor()
c.execute(query)
r = c.fetchone()
return r is not None
My feeling is to change the HAS_IDENTITY string above to something ASA
specific. I am not 100% sure what the above query is doing though
because I do not have access to an ASE database.
Thanks for the help!
Regards,
Aaron
|