Questions tagged as 'ado.net'

1
answer

Convert DataTable to List Entity

I'm trying to use the code below to convert but it gives error everywhere that has T and where . What could it be? // function that set the given object from the given data row public static void SetItemFromRow(T item, DataRow row...
asked by 06.05.2015 / 00:49
2
answers

DataGridView with columns of different tables in a DataSet

I imported 16 tables from my MSSQL into a DataSet and made all the necessary relationships. I need to generate a report on a DataGridView (or other tool) with columns specific to several tables. How can I do this?     
asked by 02.12.2014 / 13:48
2
answers

SqlDataAdapter Query with Parameters

I'm having difficulty returning a query in the database using SqlDataAdapter with parameters. Well, I have a layered application in my View when I first access feed a GridView with a query (this part is ok)! In this same View...
asked by 05.06.2014 / 20:22
1
answer

How to get an output parameter from MySql via C #

I researched and applied what I saw, but it is giving error: MySqlConnection con = new MySqlConnection(banco.Conexao); MySqlCommand comando = new MySqlCommand("sp_venda", con); comando.CommandType = System.Data.CommandType.StoredProcedure; co...
asked by 26.03.2014 / 16:44
1
answer

Add parameters to IDbCommand

I used the method below to add parameters using the interface IDbCommand using System; using System.Collections.Generic; using System.Linq; using System.Text; using EstudoDotNet.Comum.Dominio; using System.Data.S...
asked by 26.11.2014 / 23:55
2
answers

Scaffolding ASP.NET giving error

The error is generated using VS 2012. When I try to create the Controller for my News using the Entity framework, I have already tried in several ways. My database you can see on the server explorer on the left. I'm trying to create the contr...
asked by 06.02.2014 / 20:00
2
answers

Doubt C # ADO.NET Class - Accessing Data from a DataTable

Hello, good evening, I'm new here and a beginner in C # programming. I'm developing a CRUD system for vinyl records (a particular hahaha) using ADO.NET classes, similar to the article below. However, I'm not getting any progress in my rs proj...
asked by 19.07.2018 / 02:55
1
answer

How to traverse a DataSet based on data contained in a DataGridView?

I need to fill in a datagridview that already contains the relation of all the items. This is based on material movement records that are in DataSet . datagridview already has all the items, like for example: A, B, C, D., et...
asked by 23.08.2016 / 01:15
1
answer

Sql Reader returning null value

I'm running a datareader , but it does not return any value, I've already checked the table and the conditions ( where ) of select exist in the table. The code follows below: public void consulta() { string sq...
asked by 04.06.2016 / 18:06
0
answers

DbDataReader stops reading after a while [closed]

When the database is in the beginning, it works perfectly, after some time of use, the object does not return anything and the query does not work. This is the source: using (DbCommand cmd = CreateCommand(conn, sql.ToString())) { List&l...
asked by 22.09.2015 / 21:58