大家看一下这个关于在delphi中自动 建库的代码问题??
procedure TForm1.Button1Click(Sender: TObject);
var
s:string;
sqlfile:textfile;
sqltext:string;
begin
AssignFile(sqlfile,'bb.sql');
Reset(sqlfile);
while not eof(sqlfile) do
begin
Readln(sqlfile,s);
sqltext:=s;
while (not eof(sqlfile)) and (uppercase(trim(s))<>'GO') do
begin
Readln(sqlfile, s);
if (uppercase(trim(s))<>'GO') then
sqltext:=sqltext+' '+s;
end;
adoquery1.Close;
adoquery1.SQL.Clear;
adoquery1.SQL.Add(sqltext);
adoquery1.ExecSQL;
end;
CloseFile(sqlfile);
application.MessageBox('数据库升级完成!','提示',MB_OK+MB_ICONINFORMATION);
end;
第一行:''付近有语法错误。
在编译时老是出现这段文字,哪位知道问题出在哪