Upgrade to Delphi 6
Original: Borland Corporation
Translation: MusicWind®
Date: 2001-07-11
statement:
The content of the following article takes the help document that comes with Delphi 6.
Copyright Borland Corporation.
Translation This draft has not been approved by Borland in advance, and it hopes that Borland is forgiven.
General rule
Open Delphi 5 (or earlier) from Delphi 6, Delphi will automatically upgrade it. What will be described below is some modifications that may have potentially impact on existing Delphi projects in the new version.
Ide (integrated development environment) features
Automatic update of package name
Compatibility problem
For more information, please refer to the content of "Delphi6 New Features".
Overview
When You Load a Delphi 5 Or Earlier Project Into Delphi 6, IT IS Automatic Updated. The Following Topics Describe Changes That Could Potentially Impact Existing Delphi Projects:
IDE ISSUES
Automatic package name updates
Compatibility Issues
Refer Also to the What's New for Information ON Additional Features That You May Want To Incorporate Into your application.
Compatibility problem
What is listed below is possible to affect a few big aspects of your Delphi application:
Compatibility Issues
FOLLOWING ARE General Compatibility Issues That May Affect Your Delphi Applications:
One. Changes in some events of Provider and Client Dataset due to changes in VCL architecture
The introduction of TCustomClientDataSet makes some changes in the event handling mechanism in Delphi 5 or earlier versions.
There are five types of six events in dbclient.pas units, they are:
Event type change
TRESOLVERROREVENT affects the ONUPDATEERROR event of the Provider.
TbeForeUpdateRecordEvent affects the BeforeUpDateRecord event of the Provider.
TAFTERUPDATERECORDEVENT affects the AfterUpDateRecord event of the Provider.
TPROVIDERDATAEVENT affects the ONGETDATA AND ONUPDATEDATA event of the Provider.
TRECONCILEERROREVENT affects the onReconcileError event in Client Dataset.
The TclientDataSet in the process function (procedure) mentioned above must be replaced with TCUSTOMCLIENTDATASET.
Provider, Client Dataset Events Affected by VCL Hierarchy Change
.
Six Events in FIVEES Are Affected by the change to dbclient.pas. They Are: Type Event Change
TRESOLVERROREVENT AFFECTS The Provider's onupdateError Event.
TbeForeUpdateRecordEvent Affects The Provider's BeforeUpdateRecord Event.
TAFTERUPDATERECORDEVENT Affects The Provider's afterUpdateRecord Event.
TPROVIDERDATAEVENT AFFECTS The Provider's ONGETDATA AND ONUPDATA Events.
TreconcileerRorEvent Affects The Client DataSet's onReconcileError Event
In Event Handlers Using The Events NOTED ABOVE, You Must Replace TclientDataSet with tcustomClientDataSet.
two. Changes in the code to log in to the default database
Originally, a LoginPrompt property of a connection component (such as TDatabase, TadoConnection, or TDCOMConnection) is set to True, the default login dialog popping out. This feature is no longer reserved unless you add a statement that reference dblogdlg in unit reference. If you want an application to still pop up the default login dialog, be sure to add this dblogdlg, otherwise there will be no prompt to enter the username and password.
Code Change Required for Default Database Login Dialog
Previously, setting the LoginPrompt property of a connection component (such as TDatabase, TADOConnection, or TDCOMConnection) caused a default login dialog to appear. This is no longer the case unless you add to your uses clause. Applications that depend on the default login dialog Must be edited to add dblogdlg to the buys clause or the will not prompt for user name and password.