【Vegas原创】善用try catch

 

  string strsql = ".......";
                    
try
                    {
                        DataSet ds 
= db.GetDataSet(strsql);
                        strText 
= ds.Tables[0].Rows[0][0].ToString() + "%";
                    }
                    
catch
                    {
                        strText 
= "ERROR";
                    }

 

posted @ 2007-10-12 11:08  李济宏(Amadeus)  阅读(110)  评论(0编辑  收藏  举报