错误IErrorInfo.GetDescription失败,错误代码为E_FAIL(0x80004005)

时间:2018-09-19 01:43:43

标签: vb.net csv oledb

我在执行此行代码时遇到错误,则错误IErrorInfo.GetDescription失败,错误代码为E_FAIL(0x80004005)。出现。

我的代码

   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)

我已经尝试将所有保留字都放在括号内

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]

,但仍然出现相同的错误。

0 个答案:

没有答案