Delphi

本类阅读TOP10

·分布式网络考试系统原型分析及实现
·游戏外挂设计技术探讨①
·使用HOOK随心监视Windows
·Delphi 水晶报表打包解决
·试题库开发中非文本数据的处理
·如何将几个DBGRID里的内容导入同一个EXCEL表中....的问题
·如何使用Delphi设计强大的服务器程序
·工人线程中关闭窗体的实现
·用DLL方式封装MDI子窗体。
·支持XP下托盘栏气球提示的托盘单元

分类导航
VC语言Delphi
VB语言ASP
PerlJava
Script数据库
其他语言游戏开发
文件格式网站制作
软件工程.NET开发
升级到Delphi 6 - 兼容性问题之一

作者:未知 来源:月光软件站 加入时间:2005-2-28 月光软件站

升级到Delphi 6

原著:Borland Corporation

翻译:Musicwind®

日期:2001-07-11

声明:

以下文章的内容取自Delphi 6附带的帮助文件。

版权所有Borland Corporation

翻译此稿事先没有得到Borland的批准,鲁莽之处,希望Borland多多原谅。

 

 


总则

Delphi 6中打开Delphi 5 (或更早版本)的工程,Delphi 会自动对其进行升级。以下将要介绍的是新版本中可能会对现有的Delphi工程带来潜在影响的一些改动。

IDE(集成开发环境)特性

       包名称的自动更新

       兼容性问题

想要了解更多其他信息,请参考”Delphi6新特性”这一部分的内容。

 

OverView

When you load a Delphi 5 or earlier project into Delphi 6, it is automatically 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 applications.

 

兼容性问题

以下列出的是可能影响你的Delphi应用程序的几个大的方面:

 

Compatibility issues

Following are general compatibility issues that may affect your Delphi applications:

 

一.             由于VCL体系结构的变化而引起的ProviderClient Dataset 的一些事件的变动

 

TCustomClientDataSet的引入,使得Delphi 5或早期版本中的事件处理机制做些变动。

DBCLIENT.PAS单元中有5种类型的6个事件发生了变化,他们分别是:

 

事件类型                    变化

 


TResolverErrorEvent            影响到provider OnUpDateError 事件。

TBeforeUpdateRecordEvent   影响到provider BeforeUpdateRecord事件。

TAfterUpdateRecordEvent     影响到provider AfterUpdateRecord事件。

TProviderDataEvent             影响到provider OnGetData and OnUpdateData事件。

TReconcileErrorEvent           影响到client dataset OnReconcileError 事件。

 

必须将以上提到的这些事件对应的处理函数(过程)中的TClientDataSet替换为TCustomClientDataSet

 

Provider, client dataset events affected by VCL hierarchy change

The introduction of TCustomClientDataSet requires changes to event handlers in Delphi 5 and earlier code.

Six events in five types are affected by the change to DBCLIENT.PAS. They are:

 

Type       Event                   change

 


TResolverErrorEvent            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 OnUpdateData events.

TReconcileErrorEvent           Affects the client dataset’s OnReconcileError event

 

In event handlers using the events noted above, you must replace TClientDataSet with TCustomClientDataSet.

 

二.             使用默认数据库登录的代码的变动

 

原先,将一个连接组件(比如 TdatabaseTADOConnection,或TDCOMConnection)的LoginPrompt属性设置为True,则会有默认的登录对话框弹出。这一特性已经不再保留除非你在单元引用中增加一个引用DBLogDlg的语句。如果想要应用程序仍然能够弹出默认的登录对话框,务必加上 Use DBLogDlg这么一句,否则便不会有任何提示输入用户名和密码。

 

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 uses clause or they will not prompt for user name and password.

 






相关文章

相关软件