Open gbwey opened 9 years ago
I have a similar problem, but with uniqueidentifier
.
OK, my issue is now solved. What caused it was the uniqueidentifier
but what resolved it was to have the column it represents as the last one in the select statement. Order of columns does not matter in my case.
Hi, I am getting an "Invalid Descriptor Index" error (as below) when selecting from tables that have varbinary(max) fields. This used to work about a year ago (not sure if that helps). Anyway here is a small example that fails using HDBC-odbc-2.4.0.1.
Thanks for any help you give me. Grant
CREATE TABLE [dbo].[testblob]([id] [bigint] IDENTITY%281,1%29 NOT NULL, [bs1] [varbinary]%28max%29 NULL, PRIMARY KEY CLUSTERED %28 [id] ASC %29)
insert into testblob values(convert(varbinary(max),'xxxxx'))
conn <- H.connectODBC connectionString stmt1 <- H.prepare conn "select * from testblob" vals <- H.execute stmt1 [] results <- H.fetchAllRowsAL stmt1 mapM_ print results
*\ Exception: SqlError {seState = "[\"07009\"]", seNativeError = -1, seErrorMsg = "sqlGetData: [\"0: [Microsoft][ODBC Driver 11 for SQL Server]Invalid Descriptor Index\"]"}