Thank you very much
Is there a solution for my second question, How can i put a grid view to view the records from the database?
Code:public DataSet PMEWDirectorates_GetAll() { SqlConnection con = new SqlConnection(); SqlCommand com = new SqlCommand(); SqlDataAdapter da = new SqlDataAdapter(); DataSet ds = new DataSet(); try { con.ConnectionString = conString; con.Open(); com.Connection = con; com.CommandType = CommandType.StoredProcedure; com.CommandText = "PMEWDirectorates_GetAll"; da.SelectCommand = com; com.Parameters.AddWithValue("@ID", DBNull.Value); com.ExecuteNonQuery(); da.Fill(ds); return ds; } catch { return ds; } finally { con.Close(); ds.Dispose(); da.Dispose(); com.Dispose(); con.Dispose(); } }




Reply With Quote