[egenix-users] cursor.specialcolumns

M.-A. Lemburg mal at lemburg.com
Mon Dec 30 23:34:04 CET 2002


Michael Rothwell wrote:
> Well, passing the arguments all in the right order worked:
> 
> x.cursor.specialcolumns(None,None,"NameAndAddr",mx.ODBC.Windows.SQL.BEST_ROWID, 
> mx.ODBC.Windows.SQL.SCOPE_CURROW, mx.ODBC.Windows.SQL.NO_NULLS)
> 
> It didn't matter if I used NO_NULLS or NULLABLE.

Does SQL.SCOPE_TRANSACTION also work ? I'd take that as most
secure way of dealing with your particular problem.

>> Hmm, looking at the C code: there's a typo which seems to cause keyword
>> arguments to not work properly. This could be the cause for the empty
>> result sets.
>>
>> Please try the argument in the order given in the documentation
>> and pass them in without argument names.
>>
>> I just .specialcolumns() with SAP DB and did get some results this
>> way:
>>
>>  >>> c.specialcolumns(None, None, 'EGENIX_VISITORS', SQL.BEST_ROWID, 
>> SQL.SCOPE_TRANSACTION)
>> 1
>>  >>> c.fetchall()
>> [(1, 'SYSKEY', -2, 'CHAR() BYTE', 8, 8, None, 2, 'BYTE')]
>>  >>> c.execute('select SYSKEY from EGENIX_VISITORS')
>>  >>> c.fetchall()
>> [('\xff\xfe\x00\x00\x00\x00\x00\x01',),]
>>
>> This seems to be an internal row identifying key used by the database
>> internally. It is not defined in the table schema.
>>
>> OTOH, SQL.ROWVER doesn't seem to be supported by SAP DB at all.

-- 
Marc-Andre Lemburg
CEO eGenix.com Software GmbH
_______________________________________________________________________
eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,...
Python Consulting:                               http://www.egenix.com/
Python Software:                    http://www.egenix.com/files/python/




More information about the egenix-users mailing list