Question

My Sybase query is quite simple for eg.

select adjusted_weight from v_temp_idx_comp where ric_code='0005.HK' and index_ric_code='.HSI'

Query returns result for all columns except for one column -> adjusted_weight. Whenever I include this column in my query I get following error

pyodbc.Error: 'HY000', 'The driver did not supply an error!')

adjusted_weight column data type defined for this table is numeric which is correct. In fact when I run this query using some other application (which uses other driver) I get results without any error. I have issue only when I query from python using pyodbc.

I am using windows 7 machine, python version 2.6.1 Sybase driver: {Adaptive Server Enterprise}

What is wrong with my column? How can I resolve this issue?

Was it helpful?

Solution

resolved this issue. the problem was in the view that i am querying. the precision of one of the columns (which is calculated automatically using some operation) is more than what is supported by sybase standards. Some drivers handle it preopery but some cannot. Sybas's own driver doesn't report error correctly.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top