Questions tagged as 'ado.net'

5
answers

How do I join two results of a query?

I'm developing an application in C # and would like to know how to merge two results from two queries into one. I have the following code: public List<MalaDireta> ObterMalaDireta() { List<MalaDireta> resultado = new List&...
asked by 11.12.2013 / 17:08
3
answers

What are providers? What is the difference between OLE DB and ODBC?

I need to read dbf files. I found a tutorial to read the same where the author uses these two providers. In the code I only saw differences in the connection string. What are these providers? What's the difference between them?     
asked by 25.06.2014 / 17:56
4
answers

How to display value related to combobox in the textbox?

I'm doing a project in C # and SQL Server, and I need the item selected in the combo to display the corresponding values in a textbox . Here are the codes I've tried: private void preencherCBDescricao() {...
asked by 28.11.2015 / 19:39
4
answers

What would be the best way to do a CRUD for a framework in the most generic way possible?

I am studying to do a CRUD for a framework but I am trying some problems to be able to do this in the most generic way possible. For example: I have a class Pessoa() I want to do CRUD passing only the Person object to another class...
asked by 05.02.2014 / 21:04
2
answers

Close connection to database C #

I am making a login system and I get the exception sql message when I try to create a new account in the database: MySqlCommand usuaExiste = new MySqlCommand( "SELECT * FROM contas WHERE nome = '"+textBox1.Text+"'", bdConn); bool resultado...
asked by 21.02.2014 / 20:45
1
answer

Recommended way to populate variables with bank data

Assuming this dummy method to get data from the database, let's say SQL Server: public List<DadosDTO> ObterDados() { try { comand = connectionFactory.CreateCommand(); comand.CommandText = "SE...
asked by 01.08.2014 / 15:39
1
answer

Filling aggregate class from dataTable using a Dataset with LINQ C #

I'm having trouble filling an aggregate class in C #. Is it possible using LINQ? Does anyone have any examples of how to work around this problem using the return of a DataTable or DataSet ? public class OrderDetails { . . ....
asked by 20.05.2015 / 05:43
1
answer

What is ADO.Net for C #?

I'm starting to learn about C # for Web applications, and wanted to know what is ADO.Net and what are the advantages of using it?     
asked by 04.10.2015 / 17:25
7
answers

How to use multiple SQL statements (in the delete case in ORACLE) on a single line in C #?

I made a command because of foreign keys, just to plug hole, but it is not working because of an invalid character error, I believe it is ";" . I know I'm doing this the wrong way, so I accept suggestions for a more appropriate code. At...
asked by 05.02.2014 / 14:11
1
answer

Connection pool with ADO.NET and Dispose of SqlConnection, what is correct to do?

Yesterday I asked a question yesterday about What is the difference between implementations of IDisposable? I was implementing a class to help get instances of SqlConnection , SqlCommand , SqlDataReader methods Execute...
asked by 24.06.2015 / 16:26