Answer:
Public DataSet SampleToExecute_SP_IN_DOTNET() { DataSet DataSetHome = new DataSet(); SqlConnection SqlConnectionHome=new SqlConnection(strConnectionString); SqlCommand SqlCommandHome=new SqlCommand(); SqlCommandHome.Connection = SqlConnectionHomeReportCheck; SqlCommandHome.CommandText = "CLM_getCurYearStatistics"; SqlCommandHome.CommandType = CommandType.StoredProcedure; SqlDataAdapter DataAdapterHome = new SqlDataAdapter(SqlCommandHome); try { DataAdapterHome.Fill (DataSetHome); return DataSetHome; } catch(SqlException ex) { throw(ex); } catch(Exception ex) { throw(ex); } finally { DataAdapterHome.Dispose (); SqlCommandHome.Dispose(); SqlConnectionHome.Close(); } }
Previous Question | Next Question |
What is versioning in .NET? | Explain Why Datareader is useful? |