[egenix-users] InterfaceError: ('07009', 0, '[Microsoft][SQL Native Client]Invalid Descriptor Index', 6793)

M.-A. Lemburg mal at egenix.com
Fri May 8 15:23:57 CEST 2009


akm wrote:
> Hi ,
> 
> I am getting an error like this.
> Can anyone give me a pointer why this occur ?

The ODBC driver probably doesn't know how to handle a binding
parameter at that position.

Try cursor.executedirect(). That pushes the binding logic
to the server side.

> I am using 2.1.0 version of mx.ODBC.

We only ship that version with the mxODBC Zope DA. If you want
to use mxODBC stand-alone, then it's better if you upgrade
to our latest mxODBC 3.0 release.

>>>> import mx
>>>> mx.ODBC.__version__
> '2.1.0'
>>>> from mx.ODBC import Windows as MS
>>>> conn = MS.connect(dsn='dsn', user='idn', password='ipasswd)
>>>> cr = conn.cursor()
>>>> cr.execute("""SELECT table1.idn,
> ...                                       table1.crt_dt,
> ...                                       table1.active
> ...                           FROM table1
> ...                           JOIN table2
> ...                            ON table1.claimant_idn = table2.claimant_idn
> ...                            AND table1.active = ?
> ...                           WHERE
> ...                           table1.number = ?
> ...                           AND table1.type = ?""", ('Y', '148', 'TEST'))
> Traceback (most recent call last):
>   File "<console>", line 14, in <module>
> InterfaceError: ('07009', 0, '[Microsoft][SQL Native Client]Invalid
> Descriptor Index', 6793)
> 
> its working fine If i move condition table1.active = ? from JOIN
> clause to WHERE clause.
> 
> Thanks,
> Abdul Kader M
> 
> 
> _______________________________________________________________________
> eGenix.com User Mailing List                     http://www.egenix.com/
> https://www.egenix.com/mailman/listinfo/egenix-users

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, May 08 2009)
>>> Python/Zope Consulting and Support ...        http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
________________________________________________________________________
2009-06-29: EuroPython 2009, Birmingham, UK                51 days to go

::: Try our new mxODBC.Connect Python Database Interface for free ! ::::


   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
    D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
           Registered at Amtsgericht Duesseldorf: HRB 46611
               http://www.egenix.com/company/contact/



More information about the egenix-users mailing list