[unixODBC-support] Regarding Unix ODBC SQLFetch issue

Nick Gorham nick at lurcher.org
Tue May 10 14:37:37 BST 2016


On 10/05/16 14:31, D Pamuleti wrote:
>
> Hi,
>
> We are using Unix ODBC 2.3.4(64-bit) for connecting to the Oracle 
> Instant Client 12.1.0.1(64-bit) in AIX machine.
>
> We are facing the below issue while calling the SQLFetch or 
> SQLFetchScroll function for fetching the data from database.
>
> Query:
>
> SQL = [select ss.description, c.capacity_code,c.use_flag from 
> sys_string ss, capacity_type c where ss.entity = 'CAPACITY_TYPE' and 
> ss.a...][length = 222 (SQL_NTS)]
>
> *_Full Query :_*
>
> select ss.description, c.capacity_code,c.use_flag from sys_string ss, 
> capacity_type c where ss.entity = 'CAPACITY_TYPE' and ss.attribute = 
> 'CAPACITY_CODE' and ss.key_value = c.capacity_code and ss.lang_id = 'EN' ;
>
> If the returned columns count are greater than 2 then SQLFetch or 
> SQLFetchScroll giving the following error “DIAG [01004] 
> [Oracle][ODBC]String data, right truncated.”
>
> For Testing purpose I modified the above query to *return only 2 
> columns* and SQLFetch or SQLFetchScroll gave the results correctly 
> without any errors.
>
> *_Modified Query :_*
>
> select ss.description, c.capacity_code from sys_string ss, 
> capacity_type c where ss.entity = 'CAPACITY_TYPE' and ss.attribute = 
> 'CAPACITY_CODE' and ss.key_value = c.capacity_code and ss.lang_id = 'EN' ;
>
> Could you please let me know is there any limit on fetching the 
> columns count or am I missing any settings for that.
>
> I am attaching the ODBC trace logs for Error and Successful run of the 
> above query. Could you please check and update your suggestions or any 
> settings required for that.
>
> Thanks,
>
> DASARI
>

Hi,

I am just about certain that this is a issue with the Oracle driver. I 
would check what size buffer your application is binding to the columns. 
Driver manager tracing may help you here.

-- 
Nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.unixodbc.org/pipermail/unixodbc-support/attachments/20160510/b7762c1b/attachment.html>


More information about the unixODBC-support mailing list