unit mp201;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Forms, Dialogs,
StdCtrls, ExtCtrls, ComCtrls, Grids, DBGrids, Buttons, Menus, Db,comobj,
DBTables, Controls, Number, Mask;
type
TFm201 = class(TForm)
Panel3: TPanel;
Tit_panel: TPanel;
Panel5: TPanel;
procedure ac_sortClick(Sender: TObject);
procedure Sort1Click(Sender: TObject);
procedure BitBtn5Click(Sender: TObject);
private
procedure mp_new;
procedure mp_modify;
procedure mp_cpp;
procedure mp_Auto;
procedure mp_Get_cpp; //에러나는 프로시져
{ Private declarations }
public
{ Public declarations }
end;
var
Fm201: TFm201;
implementation
procedure mp_Get_cpp();
var AField, brnm : string;
i : Integer;
begin
if not Fm2013.Visible then begin //배분조건폼 Create
Fm2013 := TFm2013.Create(Self);
end;
Fm2013.show;
with SQLt2013 do begin
Close;
SQL.Clear;
SQL.Add('Delete from T2013db');
SQL.Add('where (T_kubn = ''C'')');
Execsql;
end;
with SQLgcpp do begin //Getcppdb를 클리어한다
Close;
SQL.Clear;
SQL.Add('Delete from Getcppdb');
Execsql;
end;
with SQL2013 do begin //CPP 등록
close;
sql.clear;
sql.add('Insert into T2013db');
sql.add('(t_kubn,t_rt10)');
sql.add('Values');
sql.add('(:p_kubn,:p_rt01,:p_rt10)');
parambyname('p_kubn').asstring := 'C';
parambyname('p_rt01').asfloat := Fm2013.c_rt01.Value;
parambyname('p_rt10').asfloat := Fm2013.c_rt10.Value;
Execsql;
end;
end;
위에서 컴파일 하면 procedure mp_Get_cpp();에서 에러가 납니다.
[Error] mp201.pas(4341): Undeclared identifier: 'Self'
그래서
if not Fm2013.Visible then begin //배분조건폼 Create
Fm2013 := TFm2013.Create(Self);
end;
Fm2013.show;
위 구문을 막고서 컴파일 해도 에러가 납니다.
[Error] mp201.pas(4347): Undeclared identifier: 'SQLt2013'
프로시져 선언부분에 따라 나는것 같은데...고수님들 가르쳐 주십시요...
감사 합니다.
mp_Get_cpp는 폼의 메소드로 선언이 되어 있네요... 당연히 구현하실땐 폼클래스명이
앞에 나와야겠죠???
procedure TFm201.mp_Get_cpp();
begin
......
end;
^^ 항상 즐코하세요...
초보 wrote:
> unit mp201;
>
> interface
>
> uses
> Windows, Messages, SysUtils, Classes, Graphics, Forms, Dialogs,
> StdCtrls, ExtCtrls, ComCtrls, Grids, DBGrids, Buttons, Menus, Db,comobj,
> DBTables, Controls, Number, Mask;
>
> type
> TFm201 = class(TForm)
> Panel3: TPanel;
> Tit_panel: TPanel;
> Panel5: TPanel;
> procedure ac_sortClick(Sender: TObject);
> procedure Sort1Click(Sender: TObject);
> procedure BitBtn5Click(Sender: TObject);
>
> private
> procedure mp_new;
> procedure mp_modify;
> procedure mp_cpp;
> procedure mp_Auto;
>
> procedure mp_Get_cpp; //에러나는 프로시져
>
> { Private declarations }
> public
>
> { Public declarations }
> end;
>
> var
> Fm201: TFm201;
>
> implementation
>
> procedure mp_Get_cpp();
> var AField, brnm : string;
> i : Integer;
> begin
>
> if not Fm2013.Visible then begin //배분조건폼 Create
> Fm2013 := TFm2013.Create(Self);
> end;
> Fm2013.show;
>
> with SQLt2013 do begin
> Close;
> SQL.Clear;
> SQL.Add('Delete from T2013db');
> SQL.Add('where (T_kubn = ''C'')');
> Execsql;
> end;
> with SQLgcpp do begin //Getcppdb를 클리어한다
> Close;
> SQL.Clear;
> SQL.Add('Delete from Getcppdb');
> Execsql;
> end;
>
> with SQL2013 do begin //CPP 등록
> close;
> sql.clear;
> sql.add('Insert into T2013db');
> sql.add('(t_kubn,t_rt10)');
> sql.add('Values');
> sql.add('(:p_kubn,:p_rt01,:p_rt10)');
> parambyname('p_kubn').asstring := 'C';
> parambyname('p_rt01').asfloat := Fm2013.c_rt01.Value;
> parambyname('p_rt10').asfloat := Fm2013.c_rt10.Value;
> Execsql;
> end;
>
> end;
>
> 위에서 컴파일 하면 procedure mp_Get_cpp();에서 에러가 납니다.
> [Error] mp201.pas(4341): Undeclared identifier: 'Self'
>
> 그래서
> if not Fm2013.Visible then begin //배분조건폼 Create
> Fm2013 := TFm2013.Create(Self);
> end;
> Fm2013.show;
> 위 구문을 막고서 컴파일 해도 에러가 납니다.
> [Error] mp201.pas(4347): Undeclared identifier: 'SQLt2013'
>
> 프로시져 선언부분에 따라 나는것 같은데...고수님들 가르쳐 주십시요...
> 감사 합니다.
>