ASP.NET & Databases : Part 1
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 -
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.
For all the demo's you'll
need the following namespaces -
Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.Oledb" %>