WorldofASP.NET : ASP.NET Directory, Tutorial, Hosting, and Source Code
You are 1 of 129 users


Importing an Excel Spreadsheet Using Typed DataSets and TableAdapters: Creating a Data Access Layer (DAL)

Blogger : 4GuysFromRolla.com Headlines
All posts : All posts by 4GuysFromRolla.com Headlines
Category : MSSQL
Blogged date : 2008 Mar 19

Over the course of the past three tutorials we have created an ASP.NET page that allows the visitor to upload and display an Excel spreadsheet in a GridView. Our end goal is to allow the user to import the rows in the spreadsheet into the two tables of our application database, a task we will complete in this fourth installment.

In Displaying the Uploaded Excel Spreadsheet we saw how to use an OleDbConnection to programmatically connect to the Excel spreadsheet and bind it to the GridView. Likewise, we could use this same style of coding to insert data into our application database tables - connecting to the SQL Server database from code within the ASP.NET page and issuing the INSERT statements. A better approach, however, is to design a tiered architecture that separates out the different responsibilities into different layers. Specifically, we will place the code for inserting data into our database into a separate Data Access Layer (DAL), which we will create using Typed DataSets.

With the DAL created, we can then wrap up the page's core functionality: connecting to the Excel spreadsheet, enumerating its rows, and using the DAL to insert the rows into the database. Read on to learn more!
Read More >


Read comments or post a reply to : Importing an Excel Spreadsheet Using Typed DataSets and TableAdapters: Creating a Data Access Layer (DAL)
Page 612 of 1924
Next | Last

.NET News Categories








Legend : - Within 3 Days - Within 6 Days - Within 9 Days

Home | Add Resources | Sponsored Listings | Advertise with Us | SiteMap 1 | SiteMap 2 | Link To Us | Contact Us
© 2002-2008 Worldofasp.net ASP.NET Directory, Hosting and Tutorials | All rights reserved
Our Partners : ASP.NET Web Hosting | Windows Web Hosting | ASP.NET Hosting | Phone Card | PHP Directory | Bangkok Hotels |Calling Card