ASP.NET & Databases Part 1
page 1 of 7
Published: 16 Oct 2001
Unedited - Community Contributed
Abstract
This series will hopefully provide you with some knowledge of ASP.NET's workings with databases. This first part will introduce connections and providers
by . .
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 42204/ 99

Introduction

ASP.NET & Databases : Part 1

Published 10/16/01

Introduction

No matter what I try, getting your head around a dataset it not easy, there are so many methods and properties! This series will hopefully provide you with some knowledge of ASP.NET's workings with databases. I'm not going to cover everything as I could probably do a book on the subject, but I'll get you into it. This series will span several parts that I will release over a period of days, It will cover -

·         Managed Providers

·         Datasets

·         Viewing data

·         XML

So lets get started.
 

Managed Providers (?)
 

If your new, your probably asking - What's a 'Managed Provider'?
Well they are simply the a way to connect and retrieve data, like the ADODB Connection, Command and all that, but a lot more. Managed Providers come in two flavors - Vanilla and Chocolate (OLEDB and SQL Server (version 7 and above)), I like chocolate the best.
The reason behind having two separate providers is that Microsoft thinks that its SQL Server can do much better with its own provider and connection (the provider uses the tabular-data format which SQL Server uses), there has been hinting of other companies developing their own for ASP.NET but I haven't seen it, so their stuck with OLEDB (which is better than I give it credit for.

For the purpose of these demo's I'll do it in OLEDB (it's not that different, and I've already got a SQL one somewhere), but in real life, I'd be using SQL.
 

Namespaces
 

For all the demo's you'll need the following namespaces -

<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.Oledb" %>


View Entire Article

User Comments

Title: Re: One comment   
Name: Philip Q
Date: 2004-10-25 11:08:14 PM
Comment:
Jen,

The reason for that is that you have imported System.Data, but not System.Data.OleDb into your page.
Title: One comment.   
Name: Jen
Date: 2004-10-25 9:33:47 AM
Comment:
Putting the OleDBConnection command into the page_load event gives the error that OleDBConnection is not defined. However, OleDb.OleDbConnection works.
Title: Good...how to work with more than one dataset   
Name: Santhosh Kumar A.
Date: 2004-10-19 6:41:29 AM
Comment:
I found it very good. Please try to include how
to manipulate rows using For Each ... Next loop.
I was really searching for it.

Santhosh Kumar A.
Kerala, India

Product Spotlight
Product Spotlight 





Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2017 ASPAlliance.com  |  Page Processed at 2017-10-23 7:36:12 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search