Page 1 of 1

[odbc sql server driver] Invalid descriptor index

Posted: Fri Nov 08, 2013 5:50 am
by srini.dw
Hi Guys,

Please need your help to resolve this issue.

Job design
ODBC Connector -> Copy -> DataSet.

When I give the below SQL query in ODBC Connector, Iam able to view data.
select ID, Date, status, Description from Headcount

But when I give below SQL query, its having issue.
select ID, Date, status, Description, Created from Headcount

Its giving me the below error.
An exception occured while trying to receive the response from the handler: An exception was received from the handler; ODBC function
"SQLGetData" reported: SQLSTATE = 07009:Native Error Code = 0: Msg = [IBM(DataDirect OEM)[ODBC SQL Server Driver][ SQL server Driver]
Invalid Descriptor Index

The above SQL works fine in SQL server.
The column Created is datetime in Source and having the below values.
2013-04-18 04:11:03.020
2013-04-18 04:11:42.177

Any thoughts on this.

Thanks,

Posted: Fri Nov 08, 2013 9:27 am
by asorrell
Does this apply?

viewtopic.php?t=145508

Posted: Sun Nov 10, 2013 11:24 pm
by srini.dw
Thank you for the reply.
The issue was resolved with the cast function as below, seems to be data issue.

select ID, Date, status, CAST(Description as varchar(250) ) as Description, Created from Headcount

Thanks,