关于TStringList的Count求助
with TStringList.Create() do
try
LoadFromFile(FilePath);
if Count = 0 then Exit;
S := '';
for i := 0 to Count - 1 do
begin
if UpperCase(Trim(Strings[i])) = 'GO' then
begin
DBConnection.Execute(S);
S := '';
end
else
S := S + Strings[i] + #13 + #10;
end;
finally
Free;
end;
这段代码是用来建数据库里的表的,FilePath里的文件路径内容都正确,但是我运行却没有建成库,我后来发现是Count=1,但是事实上文件里有好几个表的CREATE TABLE语句,求助怎么样才能解决这个问题?