catch (SqlException ex)
{
Console.WriteLine("Exception in Main:" + ex.Message);
}
如果只这样的话不会提示出错啊,好奇怪。