DataSets and DataControls

In versions PROFESSIONAL and ENTERPRISE Xailer includes new classes for data management and handling.

Data access now is easy to manage using the Xailer's IDE and is only a few clicks away using any of the 6 different DataSets included: DBFNTX, DBFCDX, ADS, MEM, ODBC and ADO.

The DataSets are a new kind of controls, and they are part of the Form Designer, to use them you only have to choose the file format from the tool bar, for example a DBF file with CDX indexes.

The next step is to drop the DataSet inside a form, then, using the Object Inspector you can set the attributes for the DataSet as shown in the left image

Using the object inspector you will set all the attributes of the dataset visually, for example the DBF name, the list of indexes files (when using NTX), if you want to open the table in shared mode, just change the value of the lShared property to .T. and you are done !, network programming with a mouse click !, you don't need to worry about blocking when adding, deleting or modifying a record because de DataSets objects have all the needed code build-in to do the job, you just have to worry about setting the behave you want in the object inspector.

MemDataSets are a new kind of DataSets and they are used to handle bi-dimensional arrays as they were databases, this eases the visual browse design, think on MemDataSets as they were a super charged Achoice() Clipper function, fully optimized to work under Windows.

What if you want to use a SQL table stored inside a Database Server ?, well Xailer provides of 2 DataSets controls to do the job: you can use the old ODBC (Open DataBase Conectivity) technology or you can use the state-of-the-art Windows data access technology: ADO (Activex Data Objects), both technologies are fully supported in Xailer's IDE.

Xailer's DataSets let you to use any DSN (Data Source Name) defined in the ODBC data sources in the control panel, or you can use any ADO provider installed in your computer to access the most popular Database Engines: Access, SQL Server, FireBird, Postgre, up to mission critical databases like Oracle, Sybase, Informix, etc.

The ENTERPRISE version also has native access to MySQL and SQLite tables, you don't need ODBC nor ADO because Xailer includes .LIB files for accesing these two database engines, so there's no need to install anything in the client computer, no ODBC drivers, no ADO providers, your single Xailer application is enough to do the job.

The Xailer's DataSet technology allows you to change the database format without touching a single line of code, you just change the DataSet from the IDE in the form designer and that's all, now you are working with a new database format, so you can design your application to support any database, no limits.

You can also have different DataSets for different file formats inside the same application, for example you can have a DBF DataSet and at the same time you can have a SQL DataSet connected to a database engine to import / export data between the different file formats.

The dynamic duo of Xailer programming are the DataSets working hand in hand with DataControls, these DataControls are a Xailer's technology designed to ease the visual desing along to speed the data entry at run time.

A DataControl is a visual control specialized in data entry and it's linked to a field inside a table (no matter what kind of table, DBF or SQL), this relation is stablished by a DataSet.

When you drop a DataSet inside a form, the DataSet performs a conection to the database, at the same time, it retrieves additional information about the database, like the name of all the tables, and the field names of every single table within a database, so it's easy to link a control with a field. All this happens AT DESIGN TIME, not at run time, you have full access to the data during the programming stage.

As you can see in the left image, you have access to the data all the time when designing a form, so you can set the control size, and create the accurate kind of control for the type of field, for example you can use a checkbox for a logical field or a datepicker control for a date field.

The most impressive use of DataControls is the browse visual design, since you have full access to all the data inside a table, you can easily add and remove columns, set fonts and colors, use related and calculated fields etc., the best of this is that you will have a complete view of how your browse will look like in desing time, not need to compile and run to see the changes.

Updating the fields after data entry cannot be easier, Xailer provides full control to this task, you just have to instruct the DataSet to "update" the data, you can Add, Modify or Delete data, simply calling a DataSet method, no matter if the data is DBF or SQL, a single call to a method, and the DataSets does the rest.

These powerful features are available only in Professional and Enterprise versions, however, if you are a user of the Personal version, you can use the xHarbour's native OLE support to access SQL data via ADO, but I'm pretty sure that after testing the DataSets you will want to upgrade your Xailer version to Professional or Enterprise.

(c) Derechos reservados 1997-2008 Cibernética y Tecnología, S.A. de C.V.
Ave. Valle de Toluca No. 25 1er Piso Oficina 3
Fracc. El Mirador, Naucalpan, Estado de México.
Email: info@ciber-tec.com