--------------------------------这是一个data module
unit person_datamod;
interface
uses
SysUtils, Classes, Provider, DB, ADODB;
type
Tperson_datamod1 = class(TDataModule)
person_adoconn: TADOConnection;
person_adoq1: TADOQuery;
person_dsp1: TDataSetProvider;
private
{ Private declarations }
public
{ Public declarations }
end;
var
person_datamod1: Tperson_datamod1;
implementation
{$R *.dfm}
end.
-----------------------------------------------------
以下是我定义的一个类
------------------------------------------------------
unit workage_unit;
interface
uses
Windows,Messages,SysUtils,Variants,DBclient,Graphics,Classes,Forms,DB,person_datamod;
type
Tworkage=class(tobject);
private
Datamod:TPerson_datamod1;
public
constructor create;
destructor destroy;override;
end;
implementation
constructor tworkage.<问题是Tworkage在这里无法具体定义出本类的create方法打上类名后再打点就出错>//请问如何解决??
之前定义了一个没问题。除了在uses里加上要引用的单元名person_datamod
再加上
private
Datamod:TPerson_datamod1; 以外还需要写什么吗?请诸位帮我看看哪里错了?还是操作上哪一步没做到?我是新手谢谢!
谢谢了!
-----------------------------------------------------------------以下是报错信息
[Pascal Error] workage_unit.pas(1): Unable to invoke Code Completion due to errors in source code