Code: Select all
procedure TWebModule1.WebModule1CargaAsuntoAction(Sender: TObject;
Request: TWebRequest; Response: TWebResponse; var Handled: Boolean);
var Part,Codigo:string;
begin
try
Conexion.Connect;
except
Conexion.Disconnect;
Response.Content:='<h1>Erro na conexión</h1><p><p></p>';
Exit;
end;
with Query do
begin
Close;
Sql.Clear;
Codigo:=Request.QueryFields.Values['id'];
Part:=Request.QueryFields.Values['part'];
Sql.Text:='Select SESASU_ASUNTO from SES'+trim(Part)+'ASU where SESASU_CODIGO='+Codigo;
try
Open;
except
Query.Close;
Transa.Rollback;
Conexion.Disconnect;
Response.Content:='<p><h1>Non existe Asunto</h1>';
Exit;
end;
end;
Response.Content:='<b>'+Query.fieldbyname('SESASU_ASUNTO').AsString+'</b>';
Query.Close;
Transa.Close;
Conexion.Disconnect;
end;
It's fine, except export the Bullets and Numbering to html.
Why?