[unixODBC-support] SELECTing columns with data over 300 characters return blank

Nick Gorham nick.gorham at easysoft.com
Mon Jan 21 10:04:20 GMT 2008


9 wrote:

>Hi all,
>
>I'm running unixodbc 2.2.11 on CentOS 4, with both the mysql and freetds drivers, and DSNs to both MySQL and MSSQL databases.
>
>When querying a MySQL or MSSQL database using isql, it appears that VARCHAR columns that contain data greater than 300 characters are being returned as null.
>
>For example:
>$echo "select textdescription from issues" | isql -b dsn user pass
>+-------------------------------------------------------------+
>| textdescription                                                          |
>+-------------------------------------------------------------+
>|                                                                                   |
>+-------------------------------------------------------------+
>
>However, when the textdescription field has content of 300 characters or less, the content is displayed as expected.
>
>I attempted isql with -m500 to allow for larger data content to be returned, but it didn't change the symptom.  
>
>Is there something that drives this limit tha
>
>------------------------------------------------------------------------
>
>_______________________________________________
>unixODBC-support mailing list
>unixODBC-support at easysoft.com
>http://mail.easysoft.com/mailman/listinfo/unixodbc-support
>  
>

Edit exe/isql.h in the source tree and increase

#define MAX_DATA_WIDTH 300

Remember that isql is only a test app, so its not attempting to cover 
all usages.

-- 
Nick Gorham
Easysoft Limited
http://www.easysoft.com, http://www.unixODBC.org




More information about the unixODBC-support mailing list