数据库连接成功,却无法打开
错误发生在以下代码的 
                   this.objSQLMainFrameConn.Open(); 
 中,objSQLMainFrameConn是一个sql   server数据库的连接对象,在.Open之前已经实例化了,而且连接测试没有问题,程序前一段时间也运行平稳,但是突然一天这行代码总是报告错误,下面是log文件的错误记录。   我单步运行程序,发现在执行Open之前objSQLMainFrameConn对象是存在并有效初始化的。   
 [2007-7-21   12:43:16]   -   
未将对象引用设置到对象的实例。 
 [2007-7-21   12:46:43]   -   未将对象引用设置到对象的实例。 
 [2007-7-21   12:49:46]   -   未将对象引用设置到对象的实例。   
 try 
 { 
                string      AppPath   =   Application.StartupPath; 
                ObjAppConfig   =   new   CInit( "..\\..\\MainFrameConfig.xml ");   
                if   (ObjAppConfig.ErrMsg   !=   null) 
                { 
                               MessageBox.Show(ObjAppConfig.ErrMsg,    
                                "初始化错误   -   发生在读取配置文件 ",	 
                               MessageBoxButtons.OK, 
                               MessageBoxIcon.Error); 
                               Application.Exit(); 
                               return; 
                   }   
                   if   (!CLog.Initialize()) 
                   { 
                               MessageBox.Show(strRunTimeErrMsg,    
                                "初始化错误   -   发生在初始化日志文件 ", 
                               MessageBoxButtons.OK, 
                               MessageBoxIcon.Error); 
                               Application.Exit(); 
                               return; 
                   }      
                   this.objSQLMainFrameConn.Open(); 
                   string   args   = " "; 
                   args   +=   ObjAppConfig.ReadValue( "sgpro_NS_output ")   +    "    "; 
                   args   +=   ObjAppConfig.ReadValue( "sgpro_Interp_output ")   +    "    "; 
                   this.ObjWebObjectGen   =   new   CRemoteWebObjectGen(args); 
                   this.txtHTMLCode.Text   =    " "; 
 }   
 catch   (Exception   ex) 
 { 
                   strRunTimeErrMsg   =   ex.Message; 
                   MessageBox.Show( "Error:\n "   +   ex.Message,    
                   this.Name, 
                   MessageBoxButtons.OK,    
                   MessageBoxIcon.Stop);