H
huddle
Unregistered / Unconfirmed
GUEST, unregistred user!
我试着做一个从TBDEDATABASE继承来的控件,
其实很简单,只是想改一下它几项属性的默认值,
我就在create()事件里加了几句话,可是并不起作用。
编译时出现警告:dbora7.pas(16): Method 'Create' hides virtual method of base type 'TDatabase'
问题应该说明白了吧,请指点一下。谢谢
代码如下:
其实很简单,只是想改一下它几项属性的默认值,
我就在create()事件里加了几句话,可是并不起作用。
编译时出现警告:dbora7.pas(16): Method 'Create' hides virtual method of base type 'TDatabase'
问题应该说明白了吧,请指点一下。谢谢
代码如下:
代码:
unit dbora7;
interface
uses
Windows, Messages, SysUtils, Classes, DB, DBTables;
type
tdbora7 = class(TDatabase)
private
{ Private declarations }
protected
{ Protected declarations }
public
{ Public declarations }
constructor create();
published
{ Published declarations }
end;
procedure Register;
implementation
constructor tdbora7.create();
begin
inherited
aliasname:='oracle7';
Params.Add('USER NAME=zbh');
Params.Add('PASSWORD=zbh');
end;
procedure Register;
begin
RegisterComponents('BDE', [tdbora7]);
end;
end.