当我试图修改dataset背后的SQL时,我被Microsoft的一个非常有用的错误消息弄糊涂了。原始SQL为
Select * from Denormalized_V
where (@Instructor = '<ALL>' and [Section Code] in (@SectionList)) or
(@Instructor <> '<ALL>' and [Section code] in (@SectionList) and [Instructor Name] Like @Instructor)
order by [subject], [course], [course section], [respondent code]新的SQL是:
Select * from Denormalized_V
where Term = @Term and [Subject] = @Subject and Course in (@Courses) and
((@Instructors = '<ALL>') or ([Instructor Pid] = @Instructors or [Instructor Pid] = 'ALL')) and [Course Section] in (@Sections)
order by [subject], [course], [course section], [respondent code]我从查询设计器中执行执行操作,它返回值,所以我不明白为什么在我点击Ok的那一分钟就会出现"Object reference not set to an object instance“错误。
以前有没有人见过这种类型的pf行为?
发布于 2014-04-26 03:29:36
我想通了。这是我的错。我有一个在SQL中命名错误的参数。这些简单的错误中的一个,需要永远去捕捉。
https://stackoverflow.com/questions/23297349
复制相似问题