打印本文 打印本文 关闭窗口 关闭窗口
Oracle操作相关 (二)
作者:武汉SEO闵涛  文章来源:敏韬网  点击数991  更新时间:2009/4/22 21:58:56  文章录入:mintao  责任编辑:mintao

         cn.Close();        //DataReader对象未关闭之前,不能关闭连接

     }

     catch( OracleException ex )

     {

         Console.WriteLine("Exception occurred!");

         Console.WriteLine("The exception message is:{0}",ex.Message.ToString());

     }

     finally

     {

         Console.WriteLine("------------------End-------------------");

     }

 

请看结果:

Record 1:

ID:100  Name:Tony       Age:23

 

Record 2:

ID:101  Name:Jack       Age:40

 




打印本文 打印本文 关闭窗口 关闭窗口