Server Error in '/' Application.

Object reference not set to an instance of an object.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:


Line 264:            string sql = "select repeats,starttag,endtag from tags where name='" + tagename + "'";
Line 265:            OleDbDataReader dr = con.DrSelect(sql, null);
Line 266:            if (dr.Read())
Line 267:            {
Line 268:                string sql_ = "select top " + topnums + " a.title,a.titlebold,a.titlecolor,a.website,a.htmlurl,a.picSmall,a.describe,a.dates,b.infoname,a.fid,a.cid,a.id from " + param[2] + " as a,info_class as b where a.cid=b.id and a.cid=" + fid + "  and a.state>0 and a.info_state=2 order by a.state desc,a.dates desc, a.sortnum desc, a.id desc";//and a.hot>0 and a.tgstate>0 

Source File: d:\website\www.aitg.cn2\App_Code\jss_fc\JSSMethods.cs    Line: 266

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   jss_fc.JSSMethods.mt_friendhref_(String tagename, OperateDB con, String[] param) in d:\website\www.aitg.cn2\App_Code\jss_fc\JSSMethods.cs:266
   jss_fc.JSSMethods.TAGES_SINGLE(String tagename, OperateDB con, String[] param, String[] idsparam) in d:\website\www.aitg.cn2\App_Code\jss_fc\JSSMethods.cs:253
   news.Page_Load(Object sender, EventArgs e) in d:\website\www.aitg.cn2\news.aspx.cs:96
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +85
   System.Web.UI.Control.OnLoad(EventArgs e) +74
   System.Web.UI.Control.LoadRecursive() +120
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2847


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.17929