DB handling in C#

  • Thread starter Thread starter JW
  • Start date Start date
J

JW

What classes and APIs are available in .NET if program need database
support?

I have used OleDB but are there others too? Pooling such be supported,

Cheers, JW
 
The ADO.NET related namespaces and classes (System.Data, System.Data
SqlClient and other providers) all have extensive support for database work.
In addition, there are interfaces that one can use to write your own custom
provider classes such as IDbCommand, IDbDataReader, IDbConnection et. al.

There is plenty of good sample code in the Quickstarts applications as well
as in the installable Samples. These are avaiable as installation options
either from Visual Studio.NET or the free .NET Framework SDK.
Peter
 
There are several different classes to access a db but I think the
easist and "type-safest" way is to use VS to create data adapters and
generate data sets. They're quirky and there's a bit of a learning
curve but it really saves a lot of work.

I'm developing a db and a WinForms front end for it as I go, constantly
making changes the db (adding tables, changing schema and constraints
etc.) It's a pretty complicated project with about 35 interrelated
tables. To keep the program code in sync with the db would be a
nightmare w/o generated data sets.

Unfortunately the MSDN documentation on data sets is rather of sparse,
I had to figure out a lot through trial-and-error. (Same with the
winforms DataGrid control.)

Paul
 
Back
Top