开发者

Error ::Object reference not set to an instance of an object

What could be wrong ?

public int InsertUpdateQues(bllQues objbllQues)
    {


       开发者_Python百科 dsgetQues = objdllQues.InsertUpdateQues(this);  //ERROR here
        return dsgetQues;
    }

I see values getting assigned to ALL the above properties, not one is missing. Whats wrong then?

EDIT I found the error..In my dllQue class's insert update method I had two entries as sqlParam[4] =new... and sqlParam[4] =new...chnaged the 2nd one to 5.. damn..the problem is I KEEP on making silly mistakes! :( How can I avoid this so my time is not wasted this way ???


It might help to use constants for your indexes so that your code would look something like sqlParam[CustomerName] = ... That would help readability a little and you might catch your mistakes faster.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜