Image representing the Snippets category

Filling a DataTable or DataSet the Quick Way

Published 14 years ago

In .NET 1.x filling a DataSet or a DataTable meant quite some work. You needed to create a Connection object, a DataAdapter and optionally a Command object. Then you had to call the Fill method on the DataAdapter and pass it a newly created DataSet or DataTable.

In .NET 2.0, this code model has been simplified, thanks to the Load method on the DataTable and DataSet classes that takes an IDataReader as a parameter.

Read on ...
Image representing the Snippets category

How Do I Insert a Null Value in an Access Database?

Published 17 years ago

When you need to insert a null value into a column in an Access database, you could use "" to indicate a zero-length string. However, a zero-length string is not the same as Null. To insert a Null value, simple pass the keyword Null for the column, as shown in the code example.

Read on ...
Image representing the Snippets category

ADO Connection and Recordset

Published 17 years ago

This simple snippet demonstrates how to create and setup an ADO Connection to retrieve and display information from a database.

Read on ...
  • «First
  • Previous
  • 1
  • Next
  • »Last

Mobile: False

Crawler: True

I: False