Closed GoogleCodeExporter closed 8 years ago
Excellent tests. The issue is you are calling foreignKeys for the wrong table.
The first parameter is the primary-key table. The SQLForeignKey documentation
is a
bit confusing: http://msdn.microsoft.com/en-us/library/ms709315.aspx
You can either search using "test2":
for row in conn.cursor().foreignKeys("test2", params['db'], ""):
Or (more likely what you want), use the foreignTable keyword parameter:
for row in conn.cursor().foreignKeys(foreignTable="test1"):
The parameters (see foreignKeys in http://code.google.com/p/pyodbc/wiki/Cursor)
are
in the same order as the MSDN ODBC documentation, so that might help.
Original comment by mkleehammer
on 19 Apr 2009 at 11:11
Original comment by mkleehammer
on 21 Nov 2010 at 4:43
Original issue reported on code.google.com by
vgarnash...@gmail.com
on 2 Apr 2009 at 8:03Attachments: