[egenix-users] cursor.specialcolumns
Michael Rothwell
rothwell at holly-springs.nc.us
Mon Dec 30 10:04:25 CET 2002
I've been reading the mxODBC docs, and the ODBC docs (at MSDN), and I
can't seem to get cursor.specialcolumns() to yield a result set. I'm
trying it against a table with a primary key, and an identity field. The
default arguments are as follows:
specialcolumns(qualifier=None,owner=None,table=None,
coltype=SQL.BEST_ROWID,scope=SQL.SCOPE_SESSION,
nullable=SQL.NO_NULLS)
Unfortunately, the ODBC docs say this:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odbcsql/od_odbc_s_8q2b.asp
When requesting row identifiers (IdentifierType SQL_BEST_ROWID),
SQLSpecialColumns returns an empty result set (no data rows) for any
requested scope other than SQL_SCOPE_CURROW. The generated result set
indicates that the columns are only valid within this scope.
So, I do this:
cursor.specialcolumns (table="MyTable", scope=0)
I use zero because I'm not sure how to get access to "SQL.SCOPE_CURROW".
No results. I tried running a query that selects a single column, and
then run specialcolumns. No result set.
How might I get specialcolumns() to tell me what the special columns for
a table are?
More information about the egenix-users
mailing list