使用ADO访问带密码的access数据库时编译出错!求教!
unitUnit1;interfaceusesWindows,Messages,SysUtils,Variants,Classes,Graphics,Controls,F...
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Buttons, Grids, DBGrids, ExtCtrls, DB, ADODB;
type
TForm1 = class(TForm)
ADOQuery1: TADOQuery;
DataSource1: TDataSource;
ADOConnection1: TADOConnection;
Panel1: TPanel;
GroupBox1: TGroupBox;
Label1: TLabel;
DBGrid1: TDBGrid;
BitBtn1: TBitBtn;
BitBtn2: TBitBtn;
procedure BitBtn2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.BitBtn2Click(Sender: TObject);
begin
with ADOQuery1 do
begin
Close;
SQL.Clear;
sql.Add('select * from Ô±¹¤»¨Ãû²á');
Open;
end;
end;
编译错误提示是:[Error] Unit1.pas(53): Declaration expected but end of file found
[Fatal Error] Project1.dpr(5): Could not compile used unit 'Unit1.pas'
为什么没有人能帮我解答一下呢? 展开
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Buttons, Grids, DBGrids, ExtCtrls, DB, ADODB;
type
TForm1 = class(TForm)
ADOQuery1: TADOQuery;
DataSource1: TDataSource;
ADOConnection1: TADOConnection;
Panel1: TPanel;
GroupBox1: TGroupBox;
Label1: TLabel;
DBGrid1: TDBGrid;
BitBtn1: TBitBtn;
BitBtn2: TBitBtn;
procedure BitBtn2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.BitBtn2Click(Sender: TObject);
begin
with ADOQuery1 do
begin
Close;
SQL.Clear;
sql.Add('select * from Ô±¹¤»¨Ãû²á');
Open;
end;
end;
编译错误提示是:[Error] Unit1.pas(53): Declaration expected but end of file found
[Fatal Error] Project1.dpr(5): Could not compile used unit 'Unit1.pas'
为什么没有人能帮我解答一下呢? 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询