MyComponents Overview
Top  Next


flow




Figure 1

Introduction
Welcome and thank you for choosing the MyComponent suite for Delphi & Kylix. The suite is intended and certified to be used with Delphi 5/6/7/2005 & Kylix 1/2/3 and tested to work with MySQL® Servers 3.21.x to 5.x and it's databases. The MyComponent library was developed with simplicity and power in mind, thus designed for both the beginner and the advanced developer alike.

For simplicity, the library consists of two main components:
1.TMySQLServer (derived from Borland's TCustomConnection)  
2.TMySQLDataset (derived from Borland's TDataset)  
·TMySQLTable and TMySQLQuery hides some of the powerful features of the TMySQLDataset and exposes only the essential methods and properties with which real beginner developers are familiar.  

What does this mean?
It means that you don't have to manage multiple components just to access your mysql database. You can drag and drop a TMySQLServer to your form/datamodule, hook up one or several TMySQLDataset(s)/Table(s)/Query(ies) to it, and then connect that to your standard TDatasource feeding every standard or 3rd party data-aware component you own with data within seconds. Because the components are derived from the standard Delphi/Kylix Borland classes, they are full compatible with every data-aware control you get in Delphi or Kylix and all the 3rd party datacontrols.

Does this mean you give up functionality for simplicity?.. No!, on the contrary our MyComponents suite offers the same and much, much more functionality than some other vendor libraries. Have a look at the list.

Features
Since 1999, when SciBit first introduced the MyComponent library for MySQL (version 3.21.x/3.22.x back in those days), it has not only been the first full data-aware vcl for MySQL, but it has been the industry standard ever since. As a company, SciBit not only develops these components, but actively uses it inhouse for a wide variety of applications, ranging from standard end-user applications and realtime solutions to web applications like console apps/cgi/isapi. Here are some of the main features, some old and well tested and proven by thousands of developers worldwide and some new and on the cutting edge of MySQL alpha development:

Access
No more BDE/ADO/ODBC middle layers, your application will connect directly to the MySQL server either using only TCP/IP (Direct) or via MySQL's supplied libmysql.dll/libmysqlclient.so (Library). Or you can skip the MySQL server all together and access your MySQL database directly using the MySQL supplied libmysqd.dll/libmysqld.so Embedded libraries for windows or linux. You have all the power to choose the method.

Unlike borland's DBExpress mysql access, the MyComponents library's datasets are updateble all the time and allows for full bidirectional access to all your records in a dataset (recordset/resultset).

Columns
All mysql database column types are supported in delphi and kylix, from standard integers and strings right through to blob/memo columns of all sizes.

Queries
You can also control how the mysql server delivers the query result to you using the ResultType dataset property, thus if the data should all be sent at once and then the dataset will be open, or if the data is sent as and when required by your application. In other words, if you have a table with a million records but a grid which will only display 10 records at a time, it makes no sense waiting for all million records to be passed to your client application before you can browse and view your data. In this case you will set the property to rtIncremental and it will fetch your 10 records in milliseconds and only fetch the rest from the server as you scroll your data in for example a DBGrid.

Threads
Each component is fully multi threaded ready, and with the click of a ShareConnection boolean property, you can determine if a TMySQLDataset has it's own thread/connection to the MySQL server or if it shares the TMySQLServer's thread/connection with the other TMySQLServer datasets. This has the added benefit that each dataset can operate on a totally different database independently from the TMySQLServer's database. Of course, you can also get the same result by dropping two or more TMySQLServers onto your form.

Besides being able to handle multiple threads to your mysql server with the click of a button, the TMySQLDataset also supports threaded updates. This means you will no longer have a "hanging" application when one dataset performs a SQL statement or script which takes a while to finish. By setting the doThreadedUpdates in TMySQLDataset's Options as well as the Execute method, your dataset will execute updates/deletes/inserts on a separate thread, allowing the rest of your application to continue running. As if this is not enough, each TMySQLDataset also has a Execute method which you can optionally use instead of the normal "Active :=True"/"Open" methods, this will then activate the dataset in a separate thread and your grid will populate as soon as the dataset is open all while your main application function perfectly normal. This is very useful if you really do want all your million records on the client side before you work or view them, but while waiting you want the user to continue working in your application.

Standard
The TMySQLDataset (as well as TMySQLQuery and TMySQLTable) supports all the standard methods and properties you expect from a dataset, from Filter, Master/Detailing, etc.

And so much more
Then there is also many more features you would not expect to have or even see on other similar products, like for example the ability to convert all large MySQL VARCHAR columns to TMemoFields in delphi, thereby allowing you to edit the data with normal TDBMemo controls, see Options. Or the ability to get all the data at your client side in the raw format the mysql server sent it, thus everything as TStringFields and no special conversion/mapping is done for you from the mysql column types to delphi field types. Or what about the ability to convert all SET columns to a word value instead of strings, or to convert all two value ENUM columns to TBoolean fields in delphi/kylix, see Options

Compatibility
Because the MyComponents were developed with the concept of Single Source firmly in mind, you can switch your code easily and without change between Delphi and Kylix. You can write standard windows applications, just as easily as you can create ISAPI applications for IIS or CGIs for Linux Apache or even a Q(Xwindows) applications for Linux, as easily as you can write a console application for Linux.

Source
Yes, as we ourselves don't like to buy 3rd party components without source, so you should also not. With registration everyone gets full source of the MyComponents. There exists only two packages for the MyComponents, the shareware/nagware version for evaluation purposes and the registered version which comes with full source code. See How to Buy
for more information.

Control
Besides having full control over how you access your mysql database, your thread usage, how mysql tables columns are treated, how and when your resulting records are send to your application, if the communications with the server should be compressed to save bandwidth, you also have full control over the SQL send to the MySQL server. You may even inspect and change each and every SQL statement before a dataset sends it to the mysql server using the OnExecSQL method. Not only this, but each time you open, update, insert or delete using a dataset, the SQL send might actually be a script of statements, and not only a single statement. This enables you for example to add a logging SQL statement to a dataset in such away that each time this dataset opens or updates or inserts or deletes, you can log the changes to a totally different table in your database or even have changes duplicate to two identical tables, or... well you get the idea by now... you have all the power and your imagination is your only limitation.

With the MyComponents, you don't have to string up 10 components to get the job done, nor do you have to feel deprived of features. As feature rich and powerful as the library is, just as simple is it to use. The MyComponents are as simple or as complex as you want them to be! For more information see TMySQLServer and TMySQLDataset.