AuScGen.CommonUtilityPlugin.ExcelReader.GetData C# (CSharp) Method

GetData() public method

Gets the data set.
public GetData ( string strCommand ) : DataSet
strCommand string The string command.
return System.Data.DataSet
        public DataSet GetData(string strCommand)
        {
            using (SqlConnection con = new SqlConnection("Data Source=HYD-ECOLABDB;Initial Catalog=TCDAutomation;User ID=tcddev;Password=Agstcd@1"))
            {
                SqlDataAdapter da = new SqlDataAdapter();
                DataSet ds = new DataSet();
                con.Open();
                da = new SqlDataAdapter(strCommand, con);
                da.Fill(ds);
                con.Close();
                con.Dispose();
                return ds;
            }
        }