【Vegas原创】善用try catch

  string strsql = ".......";
                    
try
                    {
                        DataSet ds 
= db.GetDataSet(strsql);
                        strText 
= ds.Tables[0].Rows[0][0].ToString() + "%";
                    }
                    
catch
                    {
                        strText 
= "ERROR";
                    }
原文地址:https://www.cnblogs.com/amadeuslee/p/3744631.html