{"id":1385,"date":"2010-12-05T10:50:48","date_gmt":"2010-12-05T05:20:48","guid":{"rendered":"http:\/\/JitendraZaa.com\/blog\/?p=1385"},"modified":"2010-12-05T10:50:48","modified_gmt":"2010-12-05T05:20:48","slug":"difference-in-ado-and-ado-net","status":"publish","type":"post","link":"https:\/\/www.jitendrazaa.com\/blog\/sql\/sqlserver\/difference-in-ado-and-ado-net\/","title":{"rendered":"Difference in ADO and ADO.Net &#8211; Interview Question"},"content":{"rendered":"<p>Following are the basic difference between the ADO and ADO.Net in Microsoft .Net framework.<\/p>\n<figure id=\"attachment_1394\" aria-describedby=\"caption-attachment-1394\" style=\"width: 474px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/jitendrazaa.com\/blog\/wp-content\/uploads\/2010\/12\/ADO.Net_.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-1394 \" title=\"ADO.Net\" src=\"https:\/\/i0.wp.com\/jitendrazaa.com\/blog\/wp-content\/uploads\/2010\/12\/ADO.Net_.jpg?resize=474%2C354&#038;ssl=1\" alt=\"ADO.Net\" width=\"474\" height=\"354\" \/><\/a><figcaption id=\"caption-attachment-1394\" class=\"wp-caption-text\">ADO.Net<\/figcaption><\/figure>\n<p><!--more--><\/p>\n<ol>\n<li>Fundamentally we can say that ADO works in Connected environment whereas ADO.Net works in Disconnected environment.<\/li>\n<li>In ADO, the in memory representation of data is &#8220;<strong>Recordset<\/strong>&#8220;, whereas in ADO.Net the in memory representation of data is &#8220;<strong>DataSet<\/strong>&#8220;.<\/li>\n<li>Recordset contains only one table, but ti get the data from multiple tables JOINTS must be used.<\/li>\n<li>DataSet contains one or more than one Table. The tables between Dataset are Known as &#8220;<strong>DataTable<\/strong>&#8220;.<\/li>\n<li>In ADO, data can be accessed sequencialy with the help of RecordSet Object by using &#8220;<strong>MoveNext<\/strong>&#8221; method.<\/li>\n<li>In ADO.Net, the records are present in table and therefore it can be accessed like any other collection by iterating over it or by using Primary key index.<\/li>\n<li>In ADO.NET you open connections only long enough to perform a database operation, such as a Select or Update. You can read rows into a dataset and then work with them without staying connected to the data source. In ADO the recordset can provide disconnected access, but <strong>ADO is designed primarily for connected access<\/strong>.<\/li>\n<li>There is one significant difference between disconnected processing in ADO and ADO.NET. In ADO you communicate with the database <strong>by making calls to an OLE DB provider<\/strong>. In ADO.NET you communicate with the database through a data adapter (an<strong> OleDbDataAdapter, SqlDataAdapter, OdbcDataAdapter, or OracleDataAdapter<\/strong> object), which makes calls to an OLE DB provider or the APIs provided by the underlying data source.<\/li>\n<li>Transmitting an ADO.NET dataset between applications is much easier than transmitting an ADO disconnected recordset. To transmit an ADO disconnected recordset from one component to another, you use <strong>COM marshalling<\/strong>. To transmit data in ADO.NET, you use a dataset, which can transmit an XML stream.<\/li>\n<\/ol>\n<p><a title=\"ADO and ADO.Net\" href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/904fck4k(VS.71).aspx\" target=\"_blank\">for further read, refer this URL.<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Basic comparison between ADO and ADO.Net component in .Net Framework<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"jz_research_post":"","_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[22,14],"tags":[51,292],"class_list":["post-1385","post","type-post","status-publish","format-standard","hentry","category-csharp","category-sqlserver","tag-c","tag-sql-server"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":1359,"url":"https:\/\/www.jitendrazaa.com\/blog\/sql\/sqlserverintegrationservices\/etl-dts-and-ssis-introduction\/","url_meta":{"origin":1385,"position":0},"title":"ETL , DTS and SSIS Introduction","author":"Jitendra","date":"December 4, 2010","format":false,"excerpt":"Introduction to ETL Services, Data transformation services, SQL Server Integration Services, Advantages of SSIS over DTS, New features of SSIS 2008","rel":"","context":"In &quot;SSIS&quot;","block_context":{"text":"SSIS","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/sql\/sqlserverintegrationservices\/"},"img":{"alt_text":"What is ETL Extraction Transformation Loading","src":"https:\/\/i0.wp.com\/jitendrazaa.com\/blog\/wp-content\/uploads\/2010\/12\/What-is-ETL-Extraction-Transformation-Loading.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":191,"url":"https:\/\/www.jitendrazaa.com\/blog\/microsoft\/net\/datagrid-example-part-1\/","url_meta":{"origin":1385,"position":1},"title":"DataGrid Example &#8211; Part 1","author":"Jitendra","date":"May 18, 2010","format":false,"excerpt":"For the basics of DataGrid please refer this post: https:\/\/jitendrazaa.com\/blog\/?p=188 In this example, i will explain the basics of DataGrid control like Theming, Databinding etc. We will start our example with creating the SQL Express database of Employee which will contain the following fields : Id, FName, LName, Email. Now\u2026","rel":"","context":"In &quot;ASP.NET&quot;","block_context":{"text":"ASP.NET","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/microsoft\/net\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/jitendrazaa.com\/blog\/wp-content\/uploads\/2010\/05\/Employee.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":656,"url":"https:\/\/www.jitendrazaa.com\/blog\/sql\/sqlserver\/difference-in-var-char-and-nvar-char-in-sql-server\/","url_meta":{"origin":1385,"position":2},"title":"Difference in &#8220;varchar&#8221; and &#8220;nvarchar&#8221; in SQL Server","author":"Jitendra","date":"July 15, 2010","format":false,"excerpt":"What is the difference between varchar and nvarchar in MS SQL Server.","rel":"","context":"In &quot;SQL Server&quot;","block_context":{"text":"SQL Server","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/sql\/sqlserver\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1161,"url":"https:\/\/www.jitendrazaa.com\/blog\/sql\/sqlserver\/sql-server-pivot-table-example\/","url_meta":{"origin":1385,"position":3},"title":"SQL Server Pivot Table Example","author":"Jitendra","date":"September 29, 2010","format":false,"excerpt":"Example and tutorial of using PIVOT in SQL Server","rel":"","context":"In &quot;SQL Server&quot;","block_context":{"text":"SQL Server","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/sql\/sqlserver\/"},"img":{"alt_text":"SQL Server Pivot Table","src":"https:\/\/i0.wp.com\/jitendrazaa.com\/blog\/wp-content\/uploads\/2010\/09\/SQL-Server-Pivot-Table.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":1376,"url":"https:\/\/www.jitendrazaa.com\/blog\/sql\/sqlserver\/use-of-openxml-in-sql-server\/","url_meta":{"origin":1385,"position":4},"title":"Use of OPENXML in SQL Server","author":"Jitendra","date":"December 4, 2010","format":false,"excerpt":"In SQL Server, OpenXML is very powerful method for the XML data manipulation. This article shows that how to use the OpenXML for XML string.","rel":"","context":"In &quot;SQL Server&quot;","block_context":{"text":"SQL Server","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/sql\/sqlserver\/"},"img":{"alt_text":"OpenXML in SQL Server","src":"https:\/\/i0.wp.com\/jitendrazaa.com\/blog\/wp-content\/uploads\/2010\/12\/OpenXML-in-SQL-Server.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":1125,"url":"https:\/\/www.jitendrazaa.com\/blog\/sql\/sqlserver\/get-table-information-column-name-data-type-in-sql-server\/","url_meta":{"origin":1385,"position":5},"title":"Get Table information (Column Name, Data Type) in SQL Server","author":"Jitendra","date":"September 18, 2010","format":false,"excerpt":"Get Table information like Column Name, Data Type, Character length, Default Values etc in SQL Server","rel":"","context":"In &quot;SQL Server&quot;","block_context":{"text":"SQL Server","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/sql\/sqlserver\/"},"img":{"alt_text":"SQL Server INFORMATION_SCHEMA.COLUMNS","src":"https:\/\/i0.wp.com\/jitendrazaa.com\/blog\/wp-content\/uploads\/2010\/09\/SQL-Server-INFORMATION_SCHEMA.COLUMNS-300x44.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]}],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/posts\/1385","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/comments?post=1385"}],"version-history":[{"count":0,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/posts\/1385\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/media?parent=1385"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/categories?post=1385"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/tags?post=1385"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}