Questions tagged [datarow]

DataRow is an ADO.Net class that represents a row of a data in a DataTable.

755 questions
-1
votes
2 answers

How to convert a data row into an object array?

I have a data row which I would like to make into an object array since to add it to my data table I need an object array. What I have made up to now is this... data_table.Rows.Add(data_row.ToArray()); but this does not work since this does…
user10171440
-1
votes
1 answer

How to know if there are rows retrieved in query | clickhouse and GOlang

There's a way to know if a query retrieved data from clickhouse database using GOlang? I have this: dataRows, err := connect.Query(dbQuery) if err != nil { log.Fatal(err) } defer dataRows.Close() I'm wondering if you could do something…
Javier Salas
  • 119
  • 1
  • 3
  • 9
-1
votes
1 answer

how to update datarow in datatable using LINQ C#?

i want to update datatable(dtTaskandBugs) on some condition. want to update storyid of all the row in the datatable when the id(which is a column of the Datatable) is passed as paramter to the function GetStoryid. this is my code below it's not…
Mohit Monga
  • 79
  • 1
  • 1
  • 4
-1
votes
1 answer

foreach DataTable row select unique at second column

Not really sure how do i write my question..but im having trouble on how to write an UPDATE string for mysql for later use from the DataTable Data: ID | NAME 1 | SWORD 2 | SWORD 3 | SWORD 4 | SWORD 5 | HORSE 6 | …
Zulfakar Zukri
  • 173
  • 4
  • 21
-1
votes
3 answers

How can i recover content of a List and turn into a List

I'm reading a Excel file and inserting the content of it on a List like this: DataSet ds = excelReader.AsDataSet(); DataTable data = ds.Tables[0]; List rows = data.Rows.Cast().ToList(); this is working…
Lucio Zenir
  • 365
  • 2
  • 8
  • 18
-1
votes
1 answer

Why would there be no data in the visualiser when there is valid data in the DataTable?

I'm trying to build a wrapper for SpreadsheetLight that returns a DataSet from any .xlsx document passed through it. However, I seem to be having a problem with DataRows not being added to a temporary DataTable. Here's part of the code that parses a…
Dezzamondo
  • 2,169
  • 2
  • 20
  • 33
-1
votes
2 answers

select distinct from dataset

I have got duplicate rows in a dataset. how can i select distinct rows from that. From comments: My query is something like this: select name, age from student When I receive its output in a dataset the output consists of rows having duplicate…
saknet
  • 377
  • 3
  • 5
  • 14
-1
votes
3 answers

Calling datarow of stored procedure is not working

I want to use the Row of the Datarow in my code. What my datarow has the value which comes from the stored procedure. See the code below public void SendMail() { DataSet ds = new DataSet(); using (SqlConnection conn = new…
Nad
  • 4,605
  • 11
  • 71
  • 160
-1
votes
1 answer

Changing from string to Int in Datatable with .Select statement cannot convert string to int

I have a DataTable that I clone and I end up adding in a lot of model backed properties. One thing I noticed when I was doing sandbox/playground work with dotnetfiddle.net was that I was not using my important ID column which is of data type int. …
user5154099
-1
votes
1 answer

How to reduce the amount of objects created parsing dataset?

Dataset consists of a table of two columns. Table name=Project. One column name=Name, other column name=Resource. There are multiple repetitive project names. var dataset = FakeDataset.CreateDataset(); var projectList = new…
Paul
  • 169
  • 13
-1
votes
3 answers

Late binding in query

Yes I know what Option Strict does and I use it quite often. My issue is stemming from my Linq query and I can't seem to figure out how to get it from throwing up. I am wanting to get all DataRows in a given table where a row's id equals an id I…
Trevor
  • 7,777
  • 6
  • 31
  • 50
-1
votes
2 answers

How to compare values in two wpf datagrid values if already listed?

am tryied the below code for checking the sid value,there are two datagrid, In one datagrid,am select a row and send to another datagrid2 with a tabindex am mentioned here. First time when am sent means,it want to add to datagrid2.Then if am again…
Ramji
  • 43
  • 3
  • 12
-1
votes
2 answers

Remove A Row From A List Of DataRow

I am using a Dictionary to create a key to a List Of DataRow. I want to iterate through each key and remove rows in the List. This will throw an out of range exception when I explicitly try to remove a row. How can I alter my code to accomplish…
Nick LaMarca
  • 8,076
  • 31
  • 93
  • 152
-1
votes
3 answers

C#: Select datarow from datarow

How can I select datarow from another datarow? Datarow have [id,name,surname,phone,email,status] I need get datarow with [id, name] or [id,name,phone] foreach (DataRow row in dt.Rows) { //row have columns…
Alex
  • 39
  • 1
  • 8
-1
votes
1 answer

Reading NULL Value from SQL that is a BinaryType in c# from a Datarow

I'm trying to read the null value from my SQL. The column presentationDocBinData is Nullable and it is a NULL. So i tried reading it this way, presentation.presentationDocBinData = (Byte[])dr["presentationDocBinData"]; But according to it, they're…
Trent
  • 15
  • 6