Top "Ado.net" questions

ADO.

c# Using Parameters.AddWithValue in SqlDataAdapter

How can I use Parameters.AddWithValue with an SqlDataAdapter. Below searching codes. var da = new SqlDataAdapter("SELECT * FROM annotations WHERE …

c# parameters ado.net sqldataadapter
How to pass sqlparameter to IN()?

For some reason the Sqlparameter for my IN() clause is not working. The code compiles fine, and the query works …

c# sql-server ado.net
How to delete multiple rows in a DataTable?

How can I delete specific DataRows within a loop of a DataTable rows which meet a custom condition -lets say …

c# .net ado.net datatable datarow
Is it necessary to manually close and dispose of SqlDataReader?

I'm working with legacy code here and there are many instances of SqlDataReader that are never closed or disposed. The …

c# sql .net ado.net
Entity Framework with NOLOCK

How can I use the NOLOCK function on Entity Framework? Is XML the only way to do this?

c# entity-framework ado.net
Use of SqlParameter in SQL LIKE clause not working

I have the following code: const string Sql = @"select distinct [name] from tblCustomers left outer join tblCustomerInfo on tblCustomers.Id = …

c# sql-server tsql ado.net sql-like
SQL: Update a row and returning a column value with 1 query

I need to update a row in a table, and get a column value from it. I can do this …

c# sql-server tsql ado.net
Incorrect syntax near 'GO'

How can I execute the following SQL inside a single command (single execution) through ADO.NET? ALTER TABLE [MyTable] ADD …

sql-server ado.net
ADO.NET |DataDirectory| where is this documented?

In AppConfig it is possible to use |DataDirectory| but I can't find any doc ?

c# ado.net datadirectory
MultipleActiveResultSets=True or multiple connections?

I have some C# in which I create a reader on a connection (ExecuteReader), then for every row in that …

c# .net sql-server sql-server-2005 ado.net