datarow Questions

3

Solved

First I have last update file from DB DataTable excelData = ReadSCOOmega(lastUploadFile); , after this iterate over this data foreach (DataRow currentRow in rows) { currentRow. } Is that pos...
Clostridium asked 10/5, 2016 at 17:9

6

Solved

I've cobbled together a C# program that takes a .csv file and writes it to a DataTable. Using this program, I can loop through each row of the DataTable and print out the information contained in t...
Tiling asked 1/4, 2010 at 3:14

5

Solved

I have a dataset called "results" with several rows of data. I'd like to get this data into a string, but I can't quite figure out how to do it. I'm using the below code: string output = ""; forea...
Nazler asked 8/3, 2012 at 15:43

15

Solved

I want to convert a DataRow array into DataTable ... What is the simplest way to do this?
Quent asked 23/1, 2010 at 7:40

3

Solved

Ok, I would like to extract a DataRow out a DataReader. I have been looking around for quite some time and it doesn't look like there is a simple way to do this. I understand a DataReader is more ...
Wigwag asked 29/8, 2013 at 12:58

2

Solved

I can successfully map from IDataReader to a List of objects but when I want to take one DataRow it doesn't seem to work as expected. Am I missing something simple here? [TestFixture] public clas...
Goldbrick asked 10/7, 2014 at 0:18

12

Solved

I got this: DataTable dtEntity = CreateDataTable(); drEntity = dtEntity.NewRow(); Then I add data to the row (or not). Lots of code, really don't know if there's anything inside the row. Depen...
Splice asked 24/2, 2010 at 13:38

6

Solved

How do I add a new DataColumn to a DataTable object that already contains data? PseudoCode //call SQL helper class to get initial data DataTable dt = sql.ExecuteDataTable("sp_MyProc"); dt.Colum...
Ufa asked 22/2, 2010 at 18:3

5

Solved

I'm looking for a simple way to make a clone of a DataRow. Kind of like taking a snapshot of that Row and saving it. The values of original Row are then free to change but we still have another sav...
Dogtired asked 19/8, 2012 at 7:39

11

I created a DataRow on my project: DataRow datarow; I want to convert this DataRow to any Type of Object. How could I do it?
Botts asked 30/10, 2013 at 3:49

11

Solved

How can I delete specific DataRows within a loop of a DataTable rows which meet a custom condition -lets say the rows having an index of even number-? (Without using LINQ) Thanks
Enlistee asked 26/5, 2010 at 13:8

9

Solved

I have a problem with a DataRow that I'm really struggling with. The datarow is read in from an Excel spreadsheet using an OleDbConnection. If I try to select data from the DataRow using the colu...
Flittermouse asked 19/8, 2011 at 10:3

5

Solved

I'm using this snippet to analyze the rows I've selected on a datagrid. for (int i = 0; i < dgDetalle.Items.Count; i++) { DataGridRow row = (DataGridRow)dgDetalle.ItemContainerGenerator.Contai...
Kriemhild asked 14/5, 2012 at 21:32

8

Solved

I have a datatable and a row. I want to import the row to the datatable only if it does not exist in the datatable. How can i do that?
Philoprogenitive asked 28/9, 2014 at 18:18

3

Solved

Is there a reason why I can't do the following: foreach (var Item in DataTable.Rows) { rather than having to do foreach (DataRow Item in DataTable.Rows) { I would have thought this was possib...
Ledesma asked 24/2, 2010 at 12:6

5

Solved

I want to search rows in my DataTable. I've tried this: protected void imggastsuche_Click(object sender, EventArgs e) { string searchstring = txtgastsuche.Text; DataTable tb = DataBaseManag...
Charkha asked 24/1, 2013 at 8:59

6

I have a datarow, but how can i convert it to an int ? I tried this, but it doesn't work. dsMovie = (DataSet)wsMovie.getKlantId(); tabel = dsMovie.Tables["tbl_klanten"]; eersteRij = tabel.Rows[...
Chiseler asked 2/3, 2011 at 14:13

4

Solved

How to extract the values from data table having single row and assign to asp labels. private void GetUser(string userId) { dbr.SelectString = "select name, gender, address, contactno from userIn...
Ceasar asked 14/3, 2015 at 7:50

4

Solved

I have a text file that I read into a data table and then perform a bulk insert into a SQL Server table. It's quite fast and it works great when all the imported values are treated as strings (date...
Bolin asked 25/2, 2011 at 18:7

2

Solved

I have a function with 3 conditions: If DataRow rowstate == Added If !DataRow HasVersion(DataRowVersion.Original) If DataRow rowstate == modified My problem is with the second one, can anyone s...
Abstract asked 13/2, 2018 at 17:22

3

Solved

i have a problem with my code. foreach (DataRow dr in dt_pattern.Rows) { part = dr["patternString"].ToString(); if (part != vpart) { System.Console.WriteLine(part); System.Console.WriteLine(...
Revest asked 21/6, 2009 at 16:0

5

Solved

I have some values in a DataGridRow (item Array) and I want to fetch all these values into a string array. How can I achieve this? DataGridRow row = (DataGridRow)Lst.ItemContainerGenerator.Contain...
Relic asked 20/9, 2010 at 6:56

3

Solved

DataTable dt = new DataTable(); dt.Columns.Add(new DataColumn("Software Title", typeof(string))); dt.Columns.Add(new DataColumn("Version", typeof(string))); dt.Columns.Add(new DataColumn("Uninstall...
Marshland asked 17/1, 2014 at 17:18

2

Solved

Tell me please is this is correct way to check NULL in DataRow if need to return a string Convert.ToString(row["Int64_id"] ?? "") Or should be like check with DBNull.Value. Need to so much mor...
Nettle asked 10/12, 2014 at 10:0

8

Solved

I have two columns in a datatable: ID, Calls. How do I find what the value of Calls is where ID = 5? 5 could be anynumber, its just for example. Each row has a unique ID.
Faria asked 17/12, 2013 at 15:38

© 2022 - 2025 — McMap. All rights reserved.