My favorites | Sign in
Project Home Downloads Wiki
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 134: cursor.primaryKeys doesn't work connected to Sybase ASE 15
1 person starred this issue and may be notified of changes. Back to list
Status:  WontFix
Owner:  ----
Closed:  Nov 2010


 
Reported by pedri...@gmail.com, Nov 16, 2010
What steps will reproduce the problem?
1. c = pyodbc.connect("DSN=ASE15;...;autocommit=true")
2. c.primaryKeys()


What is the expected output? What do you see instead?
I expect to get back a return set, per https://code.google.com/p/pyodbc/wiki/Cursor.  Instead I get this:

pyodbc.Error: ('HY000', "[] [FreeTDS][SQL Server]Catalog procedure 'sp_pkeys' can not be run in a transaction. (18040) (SQLPrimaryKeys)")

What version of the product are you using? On what operating system?
>>> pyodbc.version
'2.1.7-beta0'

Linux, Solaris 10 x86.

Please provide any additional information below.

This is connected to a sybase ASE 15 server.
Nov 16, 2010
#1 pedri...@gmail.com
OK, so I found the autocommit property, and wrapping my call between setting it to true and back to false seems to work.  It's trange that the autocommit=true flag in the connection string isn't working.  Any thoughts on that?
Nov 19, 2010
Project Member #2 mkleehammer
That's very weird, but it seems to be database-specific issue, so I'm going to leave the code as is.

Thanks for reporting the workaround.  I've added it to the FAQ page and will see if there are any other places it needs to be.


Status: WontFix
Nov 20, 2010
Project Member #3 mkleehammer
 Issue 137  has been merged into this issue.

Powered by Google Project Hosting