unit de1;interfaceuses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, Grids, DBGrids, StdCtrls, DB, ADODB;type
  TForm1 = class(TForm)
    ds1: TDataSource;
    Button1: TButton;
    qry1: TADOQuery;
    con1: TADOConnection;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;var
  Form1: TForm1;implementation{$R *.dfm}procedure TForm1.Button1Click(Sender: TObject);
begin
//tbl1.Open;
qry1.sql.Clear;
qry1.SQL.Add('select * from user');
qry1.Open;
end;end.
[错误] Write error on 'C:\Project1.exe'
[错误] RLINK32: Error writing file "C:\Project1.exe"

解决方案 »

  1.   

    重启delphi环境,
    在存储代码的文家夹下找到Project1.exe,然后删除。
    打开delphi,重新编辑就可以了!
      

  2.   

    一波刚平一波又起....接着出现 "工程project1.exe检测到错误类eoleexception ,错误 信息:'from 子句语法错误.'",进程中止,请用单步或运行继续运行.我的 'select * from user' 没错啊..
      

  3.   

    procedure TForm1.Button1Click(Sender: TObject);
    begin
      qry1.close;          
      qry1.sql.Clear;
      qry1.SQL.Add('select * from user');
      qry1.Open;
    end;
      

  4.   

    qry1.close; 这个要加上的,在打开的情况下是改变不了SQL的
      

  5.   

    啥数据库,user是不是关键字,
    用[]或""把user包起来试试
    [user] 
    "user"