坚
坚持信念
Unregistered / Unconfirmed
GUEST, unregistred user!
用IdHTTP1做下载数据:
提示:
HTTP/1.1 500 Internal Server Error 错误
该怎么样解决?
代码如下:
procedure TfrmMain.BitBtn2Click(Sender: TObject);
var
i: integer;
sHttp, sEMail, sDate: string;
begin
IdHTTP1.HandleRedirects := True;
for i:=90000 to 96172 do //710057 300000 // 709000 //上限780000 5000000
begin
sHttp:='http://www.fjhouse.cn/HOUSE/detail.asp?id='+IntToStr(i);
str:='';
str:= IdHTTP1.Get(sHttp);
if trim(str)<>'' then
begin
sEMail:= GetContent(str);
// sDate:= Getyourname(str);
with ADOQuery2 do
begin
Close;
SQL.Clear;
SQL.Add('Select * from GetDB where EMail='+QuotedStr(sEMail));
Open;
end;
if (ADOQuery2.RecordCount <> 1) and (trim(sEMail)<>'') then
begin
with ADOQuery1 do
begin
Append;
FieldByName('EMail').AsString := sEMail;
// FieldByName('sDate').AsString := sDate;
FieldByName('lID').AsInteger:= i;
Post;
end;
end;
end;
end;
end;
提示:
HTTP/1.1 500 Internal Server Error 错误
该怎么样解决?
代码如下:
procedure TfrmMain.BitBtn2Click(Sender: TObject);
var
i: integer;
sHttp, sEMail, sDate: string;
begin
IdHTTP1.HandleRedirects := True;
for i:=90000 to 96172 do //710057 300000 // 709000 //上限780000 5000000
begin
sHttp:='http://www.fjhouse.cn/HOUSE/detail.asp?id='+IntToStr(i);
str:='';
str:= IdHTTP1.Get(sHttp);
if trim(str)<>'' then
begin
sEMail:= GetContent(str);
// sDate:= Getyourname(str);
with ADOQuery2 do
begin
Close;
SQL.Clear;
SQL.Add('Select * from GetDB where EMail='+QuotedStr(sEMail));
Open;
end;
if (ADOQuery2.RecordCount <> 1) and (trim(sEMail)<>'') then
begin
with ADOQuery1 do
begin
Append;
FieldByName('EMail').AsString := sEMail;
// FieldByName('sDate').AsString := sDate;
FieldByName('lID').AsInteger:= i;
Post;
end;
end;
end;
end;
end;