In Brief

This chapter discussed how to work with ADO.NET components and how to perform simple file I/O:

  • When you are working with GUI components and editors, it is usually good to know what code is being generated in case something goes wrong and it needs to be fixed. Coding ADO.NET components is straightforward and only takes a few components such as a BdpConnection, which is used by a BdpCommand, which is used by a BdpDataReader for a read-only stream of data. Another scenario is the disconnected DataSet where a BdpConnection is created and used by a BdpDataAdapter, which fills a DataSet that may be bound to a DataGrid, held for later use, or released when no longer necessary.

  • Using GUI components in the IDE may be a good way to perform quick-and-dirty application development for one-time applications and prototypes. However, for multitiered application development, it is best to code the data access layer without relying on the GUI tools.

  • C#Builder offers a Data Explorer window where connections to multiple databases may be made and their data and objects may be explored and queried. Using drag-and-drop, either from the Data Explorer or Tool Palette, you can generate data access code efficiently and quickly. Each component also has a specialized editor to make the development experience even more productive.

  • When speaking about data persistence, it is also helpful to consider file I/O. The System.IO namespace contains many types to help read and write stream data. There are high-level types like File and Directory that make it easy to work with file systems. Additionally, the System.IO namespace contains other types, such as StreamReader, StreamWriter, and comparable types for other streaming needs.



C# Builder KickStart
C# Builder KickStart
ISBN: 672325896
EAN: N/A
Year: 2003
Pages: 165

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net