#88 SQLDescribeCol() not returning col names

open
ODBC (10)
8
2005-08-17
2005-08-17
No

I am using mxODBC.unixODBC with unixODBC and mdbtools.

mxODBC performs a SQLDescribeCol() on cursor.execute() but
when I try to retrieve the cursor.description the column names are
always empty strings. This function is quite vital for my system ..

Could there be a bug in SQLRETURN SQL_API SQLDescribeCol()
@ odbc.c #597 ... ?

SQLColAttributes() used by isql works fine !

Discussion

  • Bernhard Snizek

    Bernhard Snizek - 2005-08-17

    Logged In: YES
    user_id=1012211

    This bug is believed to be fixed in the current version in CVS.
    If this is not the case, please reopen this bug with text
    explaining how to reproduce your problem. Thank you.

     
  • Bernhard Snizek

    Bernhard Snizek - 2005-08-17

    Logged In: YES
    user_id=1012211

    Adding one line fixes the problem ! Pls change in CVS

    if (szColName) {
    namelen = MIN(cbColNameMax,strlen(sqlcol->name));
    strncpy(szColName, sqlcol->name, namelen);
    szColName[namelen]='\0';
    *pcbColName = namelen;
    }

     
  • Bernhard Snizek

    Bernhard Snizek - 2005-08-17
    • assigned_to: nobody --> brianb
     
  • Bernhard Snizek

    Bernhard Snizek - 2005-08-17

    Logged In: YES
    user_id=1012211

    This bug is believed to be fixed in the current version in CVS.
    If this is not the case, please reopen this bug with text
    explaining how to reproduce your problem. Thank you.

     
  • Bernhard Snizek

    Bernhard Snizek - 2005-08-17

    Logged In: YES
    user_id=1012211

    Adding one line fixes the problem ! Pls change in CVS

    if (szColName) {
    namelen = MIN(cbColNameMax,strlen(sqlcol->name));
    strncpy(szColName, sqlcol->name, namelen);
    szColName[namelen]='\0';
    *pcbColName = namelen;
    }

     
  • Bernhard Snizek

    Bernhard Snizek - 2005-08-17
    • priority: 5 --> 8
     
  • Bernhard Snizek

    Bernhard Snizek - 2005-08-17

    Logged In: YES
    user_id=1012211

    The bug decribed occurs in the version pulled off the CVS this morning, so
    I don't believe it's fixed. Please read more here: https://www.egenix.com/
    mailman-archives/egenix-users/2005-August/000727.html

     
  • Brian Bruns

    Brian Bruns - 2005-09-10

    Logged In: YES
    user_id=11673

    I have the fix in my local copy and will check it in this
    weekend. I made a slight modification to the patch it now
    reads:

    if (pcbColName) *pcbColName = namelen;

    as NULL is a perfectly valid value to be passed from the
    client program for pcbColName.

    Brian

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks