Hi i am creating new rows and columns in datatable and passing the data from another datatable..the following code is not working..please suggest me where i am doing the error

DataTable dtHybridNames = new DataTable();
                dtHybridNames.Columns.Add("NAME", typeof(string));
                dtHybridNames.Columns.Add("CHECK", typeof(string));

                foreach (DataRow drow in ds.Tables[1].Rows)
                {
                    DataRow dNew = dtHybridNames.NewRow();
                    dNew["NAME"] = drow["NAME"];

                    if (drow["CHECK_VALUE"].ToString() != string.Empty)
                        dNew["CHECK"] = "true";
                    else
                        dNew["CHECK"] = "false";

                    dtHybridNames.Rows.Add(dNew);
                }

i got it...everything is fine...there is problem from database site..

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.