About 666,000 results
Open links in new tab
  1. c# - How do I create a DataTable, then add rows to it? - Stack …

    As you create new DataTable object, there seems no need to Clear DataTable in very next statement. You can also use DataTable.Columns.AddRange to add columns with on statement.

  2. How to read SQL Table data into a C# DataTable - Stack Overflow

    May 20, 2011 · I've read a lot of posts about inserting a DataTable into a SQL table, but how can I pull a SQL table into a C#/.NET DataTable?

  3. c# - Querying Datatable with where condition - Stack Overflow

    Mar 30, 2012 · I have a datatable with two columns, Column 1 = "EmpID" Column 2 = "EmpName" I want to query the datatable, against the column EmpID and Empname. For …

  4. c# - Convert generic List/Enumerable to DataTable? - Stack Overflow

    I have few methods that returns different Generic Lists. Exists in .net any class static method or whatever to convert any list into a datatable? The only thing that i can imagine is use Reflecti...

  5. c# - How to select distinct rows in a datatable and store into an …

    Jul 29, 2009 · dataTable.DefaultView.ToTable(true, "employeeid"); Where: first parameter in ToTable() is a boolean which indicates whether you want distinct rows or not. second …

  6. c# - How to iterate through a DataTable - Stack Overflow

    Feb 26, 2015 · I need to iterate through a DataTable. I have a column there named ImagePath. When I am using DataReader I do it this way: SqlDataReader dr = null; dr = …

  7. Inner join of DataTables in C# - Stack Overflow

    Inner join of DataTables in C# Asked 16 years, 8 months ago Modified 2 years, 11 months ago Viewed 204k times

  8. Export DataTable to Excel with Open Xml SDK in c#

    My program have ability to export some data and DataTable to Excel file (template) In the template I insert the data to some placeholders. It's works very good, but I need to insert a …

  9. c# - adding a datatable in a dataset - Stack Overflow

    Jul 21, 2015 · I'm adding a datatable to a dataset like this: DataTable dtImage = new DataTable(); //some updates in the Datatable ds.Tables.Add(dtImage); But the next time, when the …

  10. c# - How to access a specific cell value of a datatable - Stack …

    Can anyone help me how to access for example value of first cell in 4th column? a b c d 1 2 3 5 g n m l for example, how to access to value d from a data table ...