Top "Ado.net" questions

ADO.

How to create a DataTable in C# and how to add rows?

How do create a DataTable in C#? I did like this: DataTable dt = new DataTable(); dt.clear(); dt.Columns.Add("…

c# ado.net datatable
Get connection string from App.config

var connection = ConnectionFactory.GetConnection( ConfigurationManager.ConnectionStrings["Test"] .ConnectionString, DataBaseProvider); And this is my App.config: <?xml version="1.0" encoding="utf-8" ?&…

c# ado.net exception-handling connection-string app-config
Call a stored procedure with parameter in c#

I can do a delete, insert and update in my program and I try to do an insert by call …

c# asp.net sql-server stored-procedures ado.net
MetadataException: Unable to load the specified metadata resource

All of a sudden I keep getting a MetadataException on instantiating my generated ObjectContext class. The connection string in App.…

c# .net entity-framework ado.net
How do I extract data from a DataTable?

I have a DataTable that is filled in from an SQL query to a local database, but I don't know …

c# sql ado.net
How do I view the SQL generated by the Entity Framework?

How do I view the SQL generated by entity framework ? (In my particular case I'm using the mysql provider - …

entity-framework ado.net
How to use DbContext.Database.SqlQuery<TElement>(sql, params) with stored procedure? EF Code First CTP5

I have a stored procedure that has three parameters and I've been trying to use the following to return the …

c# sql ado.net linq-to-entities entity-framework-ctp5
Connection timeout for SQL server

Can I increase the timeout by modifying the connection string in the web.config?

c# asp.net sql-server ado.net
Check if SQL Connection is Open or Closed

How do you check if it is open or closed I was using if (SQLOperator.SQLCONNECTION.State.Equals("Open")) however, …

c# ado.net sqlconnection
SET NOCOUNT ON usage

Inspired by this question where there are differing views on SET NOCOUNT... Should we use SET NOCOUNT ON for SQL …

sql sql-server tsql ado.net concurrency