error IErrorInfo.GetDescription failed with E_FAIL(0x80004005)

0

I am facing error on this,when i execute this line of code then the error IErrorInfo.GetDescription failed with E_FAIL(0x80004005). appeared.

My code

   Dim sql As New OleDbCommand("Select Distinct(LOTID) = CASE when LOTID LIKE '%-%' THEN isnull(parsename(replace(LOTID,'-','.'),1),LOTID) ELSE isnull(parsename(replace(LOTID,'-','.'),1),LOTID) END, COUNT(isAvail) as isAvail from ["+csvFile +"] where isAvail = 0 group by LOTID, isAvail ", connx)

I have tried to bracket all the reserved words like this

Select Distinct([LOTID]) = CASE when [LOTID] LIKE '%-%' THEN isnull(parsename(replace([LOTID],'-','.'),1),[LOTID]) ELSE isnull(parsename(replace([LOTID],'-','.'),1),[LOTID]) END, COUNT([isAvail]) as [isAvail] from [" + csvFile + "] where [isAvail] = 0 group by [LOTID], [isAvail]

but the same error still appearing.

vb.net
csv
oledb
asked on Stack Overflow Sep 19, 2018 by Kit • edited Sep 19, 2018 by Kit

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0