Click here to Skip to main content
15,895,799 members
Everything / ADO.NET

ADO.NET

ADO.NET

Great Reads

by David Rogers Dev
Learn how to load related entities using the Entity Framework with simple examples
by dotnetdan
VS 2005 debug visualizers for DataSet, DataTable, DataView, DataRow and DataColumn objects.
by LarryCharlton
Dynamic data forms.
by Jesús López Méndez
This article introduces you to client side multi-column dynamic pivot, a cleaner, simpler and elegant alternative to the complex and convoluted dynamic server side pivot.

Latest Articles

by Jani Giannoudis
REST API Reporting for .NET
by freedeveloper
How to create a data access class in a way, that is possible to execute unit test on it
by Raphael Adeniji
Many a times, we need to programmatically manage GridView/DataGrid in Visual Studio web applications and this looks very difficult because we do not know what properties or events of the control to use. It may also be as a result of time constraint.
by Oleksandr Viktor (UkrGuru)
Minimally simple UkrGuru.SqlJson package for modern data manipulation

All Articles

Sort by Score

ADO.NET 

24 Jul 2014 by David Rogers Dev
Learn how to load related entities using the Entity Framework with simple examples
30 May 2005 by dotnetdan
VS 2005 debug visualizers for DataSet, DataTable, DataView, DataRow and DataColumn objects.
11 Aug 2013 by LarryCharlton
Dynamic data forms.
15 Jul 2014 by Jesús López Méndez
This article introduces you to client side multi-column dynamic pivot, a cleaner, simpler and elegant alternative to the complex and convoluted dynamic server side pivot.
31 Oct 2007 by Bill Seddon
Shows how a .NET based WebDAV server can be created by combining two Open Source projects. The example implementation returns files from a file system, but you can extend it to return resources from any repository.
18 Jul 2014 by Matthew Givens
How to change databases at run-time in a user-friendly manner.
17 Aug 2009 by vic_ch2000
A nullable datetime column in .NET DataGrid with DateTimePicker.
21 Jan 2013 by Srinivasu Pemma
This tip provides an easy way of dealing with different types of data sources for LINQ Group By taken from my blog http://www.srinetinfo.com/2012/12/linq-group-by.html
25 Jan 2013 by FatCatProgrammer
StarReport: WPF-less GDI+.NET report component.
5 Nov 2018 by Jovan Popovic(MSFT)
Create powerful REST API with just few lines of C# code using MsSql.RestApi package
31 Mar 2006 by Dan Radu
The DACBuilder application provides auto-generation features from multiple database systems in multiple programming languages.
29 Aug 2012 by linush
Explains how to mock test an EF Model-First project using ADO.NET Entity Data Model template
25 Nov 2016 by kannankeril
This article is an attempt at splitting out the controller layer to reduce its complexity and improve quality and maintainability of the resulting code.
24 Nov 2009 by raelango
This is a sample project to access Microsoft Access MDB data in Silverlight via OLEDB and dynamically populate a DataGrid.
11 Jan 2015 by Muhammad Hassan Tariq
Glimpse Extension for server side debugging and diagnostic information of ASP.NET applications
15 Mar 2017 by Ricardo_Torres_Torres
Read text file and insert mutiples records in just one SQL Sentence
16 Jan 2014 by Tom Glick Philadelphia, US
POC to demonstrate passing of collections of complex objects to ASP.NET Web API Controllers.
21 Feb 2018 by Yunus Emre Kalkan
How to create custom repostories in ASP.NET Boilerplate and use stored procedure, view, user defined functions inside your repository
13 Mar 2006 by Marc Clifton
An investigation into different data entry modalities and the need for a transaction sandbox.
2 Jun 2012 by Rahul Rajat Singh
+5 for the positive attitude. (even when the question is not specifically for this forum i guess people will would not mind me giving +5).Secondly, If you are really up for the task then start reading good book, watch video tutorials and the MOST IMPORTANT - get your hands dirty as much as...
26 May 2013 by Tharaka MTR
This post will show you how to fix orphaned SQL users.
2 Apr 2015 by Dr Gadgit
Written in C# and VS2010 as a class libary to be used in your own project.
29 May 2017 by tranthanhtu.vn
In this article, We will learn why do we need to manage the stages of our application.
6 Apr 2010 by seejay1120
A Fast Way to Update Treeview Nodes Using a Database as a Source
18 Apr 2012 by Alexandros Pappas
This project implements caching of DataTables and provides functionality for testing performance.
25 Apr 2012 by Razi Syed
Easily bind a class to .NET data controls like GridView, FormView, etc., and get an updated object or list back in the code-behind effortlessly.
3 Feb 2019 by Thinira
Continuous Integration and Delivery with VSTS (Visual Studio Team Services)
16 Aug 2018 by Proneetkumar Pradeep Ray
JQuery Datatable (Dynamic columns) populate after Ajax JSON response via server side processing - Using EF Raw SQL query
10 Sep 2019 by Alexandros Pappas
This project describes how to use Entity Framework with update triggers and audit tables.
2 Jul 2014 by Chakravarthi Elchuri
Display data in Multi nested gridview using C# in ASP.NET
6 Feb 2015 by Daniel Santillanes
Using ServiceStack's ORMLite framework as part of your MVC project's database access
10 Jun 2016 by Emiliano Musso
In this article, we will see how to use entity framework in our Applications, developed through the various languages that Visual Studio allows us to use. The examples in this article and probably in the next, will be C # used under WinForms, but - as mentioned - this choice is not going to affect a
8 Nov 2016 by mblataric
Instructions on how to migrate existing XAF security system to new permission policy.
7 May 2017 by Michael Lockwood
How to call a web service using SSIS, store XML results and then query XML using XQuery
5 Aug 2010 by Vinayaka Krishna Shenoy
Probable leak while using SqlDataReader in ADO.NET
5 Dec 2010 by #realJSOP
0) This question is unanswerable, other than to recommend that you hire a programmer.1) Don't use your email address as a user ID. It's beyond stupid...
7 Jan 2011 by Tim Corey
Learn how to use a dataset object to load a combobox (or other similar objects) at runtime instead of needing to set anything up at design time.
21 Mar 2011 by Wendelius
Just skimmed through the code, but have you tried moving the connection.Close(); after loading the datatable?
29 Dec 2011 by #realJSOP
There is no real order of importance. To code in .Net, you have to understand the framework.The key isn't learning everything - the key is learning everything you need to learn, as soon as the requirement presents itself. Pretty soon, you'll know a lot about everything. In the biz, we call...
16 Apr 2013 by Muhammed Anseer K K
Creating a metro style application with WCF
1 May 2013 by Nasser Malik
Split comma separated IDs to get batch of records through Stored Procedure.
20 Feb 2014 by PallavSingh
Converting data column (contains OLE db image binary Format) to image file (.jpg)
2 Nov 2015 by Sibeesh Passion
How to load data from database using Web API
28 Aug 2016 by Ali Adly
A simple example that shows how to create detail grid template at runtime using ASPxGridView
13 Sep 2023 by Jani Giannoudis
REST API Reporting for .NET
19 Dec 2010 by Not Active
No too difficultprivate static void CheckForNull(object obj, Label label, string text){ string labelText = text; if(obj != DbNull.Value) { labelText = obj.ToString(); } label.Text = labelText; ...
26 Feb 2012 by Dave Kreskowiak
Why?? Since databases don't care about the ordering of records in the table, there's no point to it. Order is defined by the application, not the database.If you're trying to reassign key values to all records in a table, that is not a solution to anything, is highly discouraged and does...
17 Jun 2012 by Prasad_Kulkarni
You'll have to create it first as a user, and then set up the correct permissions for the user.1. You'll have to ensure that your DB is configured with both User auth and SQL auth. If using the Management Studio: right-click on the Server, select "Security" ensure that server authentication...
2 Sep 2012 by Espen Harlinn
I guess you have forgotten to include the providerName for your connection string.If you are using ODT it should look something like thisOr of you are using the ms oracle provider is should look like this:providerName="System.Data.OracleClient" />Best regardsEspen Harlinn
1 Feb 2013 by S. M. Ahasan Habib
.NET TransactionScope and its default Transaction Isolation level issue.
4 Jul 2013 by sumit_kapadia
Create and Bind gridview at client side with Jquery Template and ajax in asp.net
1 Aug 2016 by dibley1973
The stored procedure framework now supports dynamic fields within multiple recordsets
25 Oct 2016 by OriginalGriff
Why not just use UPDATE?string query = "UPDATE Item SET "ItemName = @ItemName, " + "Price = @Price " + "where ID = @ID";
10 Feb 2018 by Changming Wang
A complete event calendar, using trucking/shipping as an example, built with Visual Studio Community 2015, C# MVC and jQuery.Fullcalendar
13 Mar 2009 by Tiago Freitas Leal
This project shows how to have a master/detail DataGridView using CSLA EditableRootListBase (or DynamicRootList) as the master list object. It shows how to have sorted list and auto save on both the master and detail DataGridView.
28 Feb 2011 by OriginalGriff
"OriginalGriff - 4 mins agoAnd your question is?""Dima Popov - 1 min ago"Give me code"No.We don't do your work for you.If you have a question, then please ask it.If you have a problem with part of the implementation, ask, and we will help as best we can.But we are not...
4 Jul 2011 by Wonde Tadesse
This possibly happens when the table or view you trying to add is already exists in the model. So instead of using add tab from the Update wizard[^],use the refresh tab and see the effect. You can also check either the table or view exists in the model by opening in the model file in xml...
2 Jan 2012 by Espen Harlinn
I would rethink the design, you only need to execute the inserts/updates/deletes inside the transaction - so create your transaction inside the SAVE_Click method. Best regardsEspen Harlinn
2 Jan 2012 by Mehdi Gholam
This is a very bad design. Transactions should be as short as possible as they take up resources on the RDBM server.You should absolutely not start on form load and commit/rollback on a button click which could be anything between 10 secs to 10 minutes in between.
26 Feb 2012 by Espen Harlinn
I want to reorder the primary key each time you insert or delete rows.If this is a requirement, you should go back and clarify it. It's pretty strange and I totally agree with Daves answer. Read the following Wikipedia articles carefully:First normal form[^]Second normal form[^]Third...
18 Jun 2012 by cjb110
How to identify the cause of the DataSet Constraint Exception
23 Jul 2012 by Rui Inacio
To bulk insert efficiently, the SqlBulkCopy class must be used.
27 Aug 2012 by Prasad_Kulkarni
Refer:Howto: Export a dataset to Excel (c# / asp.net)[^]CP: DataSet to Excel in Two steps – with Different Styles[^]Writing Dataset to Excel in ASP.NET[^]
18 Sep 2012 by Sergey Alexandrovich Kryukov
Please see my comment to the question. Your question might be based on some your misconception or maybe the conception you do not explain.The relationships should not really be quantified by the total number of them or something like that. And "a lot of relations" does not have to mean "a...
30 Oct 2012 by Tom Cook (UK)
How to asynchronously poll a database for an Entity with EntityFramework 5
27 May 2013 by Tharaka MTR
Generate insert statements from a specific table data using SQL Server
25 Nov 2014 by David Killian
A reflective approach to providing stored procedure based data access methods with a reuse pattern based on polymorphic Types as arguments in ObjectResult
2 Nov 2015 by Guni Van
Mapping your database with C# object class, then make typed-safe query like SQL syntax
8 Jul 2018 by Alen Toma
How to implement ObjectStatus with EntityWorker.Core and JavaScript
1 Oct 2008 by swjam
Hi,I just wanted to know the term I am looking for what it is called so I can research further.Say I have an C# application that connects to an SQL server located somewhere in a network via connection string. What is the communication...
11 Apr 2010 by Mohammad Elsheimy
Give the user the flexibility to design his sheet, report, bill, invoice, whatever.
20 May 2010 by #realJSOP
I'm with Christian on this one - if you don't know these concepts, how can you possibly get a job as a programmer?Maybe you should consider a career change - like making peanut butter and jelly sandwiches for the homeless.
8 Jun 2010 by DaveAuld
Use a standard where query to filter between the two dates, and also AND in a datepart(hh, colname) filter for the time range.
13 Nov 2010 by Kanasz Robert
Hi,just add to web.config connectionstring section with connection string and and set data source to valid name of instance
14 Dec 2010 by Al-Farooque Shubho
when we need to share the same mapping methods for different SQL queries which may have a little differences in their selection list (Which is a very common scenario) and usually we try to do either of the followings:Include all columns in the selection list of all stored procedures even if...
24 Dec 2010 by Sunasara Imdadhusen
Creating a DataTable from a DataView - DataView.ToTable()
26 Dec 2010 by Al-Farooque Shubho
You are not using any "Order By" clause in your query. So, the database server is returning the result set in an order which is not having the same order shown in the database table.Most probably, using an "Order by UserId (Or, Primary key field)" would solve this issue, but, I would...
9 Mar 2011 by Yusuf
What is your definition of e-book? Can the wealth of article here at CP be some sort of useful learning tool. To me and many it is. If you agree check it out. You will find tonnes of good articles ranging from the beginner to advanced. For starters check this one out - Using ADO.NET for...
9 Mar 2011 by Dalek Dave
This[^] may help.
21 Mar 2011 by #realJSOP
You can't call connection close until after you've read the data from the SqlDataReader object. If you haven't already, put your code in a try/catch/finally block, and close the connection in the finally portion.
13 Apr 2011 by Costica U
This should run a little fasterSqlDataReader reader = DbInfo.DataRdr(Conn, "SELECT DISTINCT Events.Location FROM Events WHERE NOT EXISTS( SELECT 1 FROM Location WHERE Code = Events.Location")int colOrdinal = reader.GetOrdinal("Location");while(reader.Read()) { ...
29 May 2011 by Abhinav S
Some links -Storing and Retrieving Images from SQL Server using Microsoft .NET[^]http://www.shabdar.org/sql-server/105-store-save-images-in-sql-server.html[^]Save An Image Into SQL Server 2000...
1 Jun 2011 by OriginalGriff
Look at the DataSet.Merge method[^] - it merges a specified DataSet or DataTable into the current DataSet or DataTable.
4 Oct 2011 by Simon Bang Terkildsen
When a method does not do what you except look at the documentation, the documentation is your friend not your enemy if you want to be serious about programming.So the documentation for DataSet.Clear[^] clearly states that all rows in all the contained tables are removed. It mentions nothing...
2 Nov 2011 by Sergey Alexandrovich Kryukov
Tomorrow? Too late. Have a walk, get a gulp of fresh air. Seriously.—SA
2 Nov 2011 by Nish Nishant
If you are not prepared, ask them for an extension, say a week or so. If you already understand basic concepts you should be able to prepare for your session in that time frame. If you absolutely need to do this tomorrow, and you already know some ADO.NET but you are not fully confident, then...
11 Nov 2011 by koolprasad2003
Step By Step explanation1. The code will check for connection first, if the connection is closed then it will open connection2. select category_id,category_name,description from category table3. fill the dataset with records4. Then fill gridview with dataset, means all records will...
28 Nov 2011 by Eduard Lu
For datagridview,try this one:DataGridViewButtonColumn btn = new DataGridViewButtonColumn();dataGridView1.Columns.Add(btn);btn.HeaderText = "Click Data";btn.Text = "Click Here";btn.Name = "btn";btn.UseColumnTextForButtonValue = true;Please mark as answer and vote 5 if...
10 Dec 2011 by Monjurul Habib
Read the following links:Do more with a DataTable and improve performanceUsing DataTables More for Improving Performance Hope you will get your idea from the above links.
10 Dec 2011 by Abhinav S
You could write an extension method that can be called on the datatable and does the calculations.You don't really need to do calculations on the datatable itself. On the other hand, it might actually be worthwhile to calculate the moving averages at the query level as well.
16 Dec 2011 by Wendelius
Well in both cases you add a new row. If you want to modify an existing rows value yuo could use for example Select[^] method to first find if such product already exists in the datatable.On the other hand having two separate rows isn't necessarily a bad thing. Each row represents a...
2 Jan 2012 by Wendelius
Agree with both good answers. A very important rule-of-thumb is: Never have user conversations inside a transaction! No questions, no notifications, just pure logic and executions of SQL statements. If you have to ask something from the user, do it before the transaction. If you encounter...
27 Jan 2012 by thatraja
Storing and Retrieving Images from SQL Server using Microsoft .NET[^]
27 Jan 2012 by Abhinav S
Have a look at...
26 Feb 2012 by Sergey Alexandrovich Kryukov
SQL and generally the access to relationship database is agnostic to the storage detail, and, in particular, to the ordering of data. The storage is optimized internally in the database system, you cannot affect it in any direct way.(Indirectly, one can change some indexing options to...
29 Feb 2012 by Espen Harlinn
Here is a nice list of tutorials:Data Access: The Official Microsoft ASP.NET Site[^]It's one of the better sources for learning what you need.Best regardsEspen Harlinn
4 Mar 2012 by Shahin Khorshidnia
look at the code: SqlTransaction trn=con.BeginTransaction(); //It's begining the transaction block//Transaction Block://...cmd2.ExecuteNonQuery(); // the sequence of the program is breaking here and it's jumping on chatch (.... because of the exception and never be...
14 Mar 2012 by OriginalGriff
"in fact i have list box contain several items and want them to several column in the table"That is where it gets harder.If you are assigning one item from your ListBox to each Row, then that is easy - just loop through and execute the appropriate INSERT statement.But a variable number...
25 May 2012 by Tauseef M
This tool is used for Encryption of Database in SQL Server 2008 Enterprise Edition