本人想把access数据库里的一个表的一个字段的值加载到combobox组合框里,可是老是不成功,出现下面的错误导致不能运行,各位看看是什么原因??
错误提示:
Build
  [Error] Unit1.pas(39): Declaration expected but end of file found
  [Fatal Error] Project1.dpr(5): Could not compile used unit 'Unit1.pas'
下面的是代码:我在标准组件里的设置应该没问题的:
unit Unit1;interfaceuses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, DBTables, StdCtrls, DB;type
  TForm1 = class(TForm)
    DataSource1: TDataSource;
    ComboBox1: TComboBox;
    Table1: TTable;
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;var
  Form1: TForm1;implementation{$R *.dfm}procedure TForm1.FormCreate(Sender: TObject);
begin
while not table1.Eof do
begin
ComboBox1.additem(table1.FieldValues['grade'],sender);
table1.MoveBy(1)    ;
end;end;