Story time ...

"Hm. The Boss told me to convert this small little bug tracking application that he wrote with Delphi 3 and DBase back in 1998 to the new and fancy .NET world and more important: afterwards create a web interface with ASP.NET. He was reading about WinForms vs. VCL.NET and decided that it should be done in WinForms. (WinForms is the short term for the components defined in the .NET Windows.Forms namespace). Should be easy, considering that I've Delphi 2005 lying around. Let's get started.

Start Delphi 2005, ….

Create new WinForms project, …

Look for TTable …

What the  â€¦.!!!"

That was my first impression (and probably of lots of Delphi for .NET users) when I first tried to create a WinForms or ASP.NET database application in "Delphi 8 for the Microsoft .NET Framework" (or how ever that official name is; for me it's Delphi 2005).

There simply is no TTable or TQuery component in WinForms and ASP.NET.

Why? What now?

Well the why is quite simple: WinForms was created by Microsoft and not by Borland. WinForms uses different classes to access data, which also builds on a completely different concept. Take a look at for a very good collection of FAQ about WinForms. Especially the chapters about Data Binding and the DataGrid are of high interest.

The Borland TDataset model is built on (or better: mostly implemented as) direct live access to the database. This means commands like edit, post, insert, delete, … are immediately applied to the underlying database.

Microsoft's earlier data access models like DAO and ADO were modeled in a very similar way. All data and it's manipulation were accessed via a RecordSet class, that was from a concept point of view very similar to the TDataset class.

The new ADO.NET concept on the other hand is built on a disconnected data access model. This means that the application is working with offline, cached data. Usually for every database interaction (request), a connection is opened, the request processed and the connection closed as soon as the request is completed. If you want, it is similar to Borland's TClientDataset usage pattern in way.

Especially in multi-user environments the disconnected concept has advantages in terms of resource conservation and server system performance. Also network latency can be kept to a minimum.

Home | Site Contents | Documentation | NexusDB Manual V4 | .NET Guide | Developing a database application with .NET