Top "Ado.net" questions

ADO.

SQLite Database Locked exception

I am getting Database is locked exception from SQLite for some queries only. Below is my code: When I execute …

c# .net sqlite ado.net system.data.sqlite
DataView.RowFilter Vs DataTable.Select() vs DataTable.Rows.Find()

Considering the code below: Dataview someView = new DataView(sometable) someView.RowFilter = someFilter; if(someView.count > 0) { …. } Quite a number of …

.net visual-studio-2008 performance ado.net datatable
Safely Removing DataRow In ForEach

I don't understand why this code does not work. foreach (DataRow dataRow in dataTable.Rows) { if (true) { dataRow.Delete(); } }

c# ado.net datatable collections datarow
Can I save an 'Object' in a SQL Server database?

I want to save an object (of any type) into a field in a database in SQL Server 2005. Is it …

c# sql-server sql-server-2005 ado.net
What's better: DataSet or DataReader?

I just saw this topic: Datatable vs Dataset but it didn't solve my doubt .. Let me explain better, I was …

c# asp.net ado.net
How to view a DataTable while debugging

I'm just getting started using ADO.NET and DataSets and DataTables. One problem I'm having is it seems pretty hard …

debugging ado.net csv datatable dataset
When should "SqlDbType" and "size" be used when adding SqlCommand Parameters?

There is a related question to this: What's the best method to pass parameters to SQLCommand? But I am wanting …

c# .net ado.net sqlcommand
Returning a single row

I'm trying to return a single row from a database: using (connection = new SqlConnection(ConfigurationManager.AppSettings["connection"])) { using (command = new …

c# ado.net asp.net-3.5
The right way to insert multiple records to a table using LINQ to Entities

As many of us have done, I set up a simple loop to add multiple records from a databse. A …

c# entity-framework ado.net linq-to-entities
Exception when AddWithValue parameter is NULL

I have following code for specifying parameters for SQL query. I am getting following exception when I use Code 1; but …

c# .net ado.net