我是德尔福的初学者。我已按照here中的教程进行操作。这是我的第一课。我想用delphi 7从oracle中检索数据。我的脚本是这样的:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Grids, DBGrids, DB, ADODB;
type
TForm_Test = class(TForm)
ADOConnection_main: TADOConnection;
qryTable_test: TADODataSet;
dsTable_test: TDataSource;
dbgTable_test: TDBGrid;
btnUpload: TButton;
procedure btnUploadClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form_Test: TForm_Test;
implementation
{$R *.dfm}
procedure TForm_Test.btnUploadClick(Sender: TObject);
begin
Form_Test.qryTable_test.SQL.Clear;
Form_Test.qryTable_test.SQL.Add('Select * from table');
Form_Test.qryTable_test.Active:=true;
end;
end.
获取错误:
第[Error] Unit1.pas[34]: Undeclared identifier: 'SQL'
行中的 Form_Test.qryTable_test.sql.clear;
我该怎么办?