Easing Transition From ASP and ADO to ASP.NET and ADO.Net Part 1/2
You shouldn't have to learn six objects beginning with the word "Data" to start using ADO.NET. More importantly, you shouldn't have to depend on learning a brand new object model for Microsoft's DataGrid object to customize the HTML you're sending to the end user. In this article Ruffin compares classic ASP and ADO to Microsoft's ASP.NET and ADO.NET technologies, easing the transition to ADO.NET for current ADO developers.
Easing Transition From ASP and ADO to ASP.NET and ADO.Net Part 1/2 - Conclusion (Page 5 of 5 )
Of course Microsoft didn't spend millions of dollars in R&D for us to use .NET to re-create yesterday’s technology. In the second part of this article I'll first show how to move this code into an aspx codebehind page and also show you how to replace not only the DataGrid's functionality, but also how to create a generic, reusable DataGrid component of your own.
As a quick recap, we've found ASP.NET and ADO.NET equivalents for a number of classic ADO objects. These objects and their counterparts are shown in the table below:
We've seen the DataReader object in action and found out that it can serve to replace what we'd done with a RecordSet object and classic ASP in the past. Finally, we saw how to replace the Microsoft DataGrid in ASP.NET pages, improving on its functionality using skills we'd already learned as ASP programmers without having to learn the DataGrid's object model. We did this in a way that will easily lend itself towards creating codebehind pages (which is what we will tackle in part two of this article) and ultimately a true DataGrid replacement.
[Note] The ADO.NET examples that we’ve seen in this article are for use with Microsoft SQL Server 7.0 or 2000 only. For other data sources (including Access, Oracle, Excel, etc) simply replace "Sql" in the objects class name with "OleDb", giving us the OleDbConnection, OleDbCommand, and OleDbDataReader objects. [End Note]
DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.