are you sure your connection is being closed with this code? I'm not so sure.
take a look at CommandBehavior.CloseConnection
Peter
--
Site:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com
Short urls & more:
http://ittyurl.net
"probashi" wrote:
> Is there any thing wrong in the following code? Thanks.
>
> ----
>
> public static DataTable GetDataTable()
> {
> DataTable dt = new DataTable();
> string SQL = "select * from authors";
>
> using (OracleConnection con = new
> OracleConnection(System.Configuration.ConfigurationManager.AppSettings["ConnectionString"]))
> {
> using (OracleCommand comm = new OracleCommand(SQL,
> con))
> {
> con.Open();
> using (OracleDataReader ord =
> comm.ExecuteReader())
> {
> dt.Load(ord);
> }
> }
> }
> return dt;
> }
>
>