Adv

顯示包含「stackoverflow」標籤的文章。顯示所有文章
顯示包含「stackoverflow」標籤的文章。顯示所有文章

6/28/2015

Answer by Dennis Cheung for com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near 'GO'

GO is not a valid SQL statement.

GO is a "command" for "SQL server management studio" and few other tools to read and to execute. It is not for the SQL Server.

You do not need "GO" in the SQL statement. you need a ";".



from User Dennis Cheung - Stack Overflow http://stackoverflow.com/questions/31099822/com-microsoft-sqlserver-jdbc-sqlserverexception-incorrect-syntax-near-go/31100553#31100553
via IFTTT

6/02/2015

How to drop/abort HTTP connection from servlet?

I'd like to force connection abort in servlet, without using HTTP header.

Problem

  1. I have a servlet that generate a file download, which pipe some bytes to OutputStream
  2. The browser read the header, with UNKNOWN-FILE-SIZE
  3. The browser downloading byte streams.
  4. Servlet could like to abort the download in the middle.
  5. Let the browser abort and delete the downloaded file, and mark it as failed

Facts

  • The header is already sent.
  • The file-size is unknown until complete, cannot use Content-Length:
  • There is no .abort() or .disconnect() in HttpServlet{Request,Response}
  • The servlet has to be generic, without hacking servlet container specific API for Socket stealing
  • The contains and size are dynamic, which could be heavy for generate file(or make sure everything are in RAM) before download


from User Dennis Cheung - Stack Overflow http://stackoverflow.com/questions/30589597/how-to-drop-abort-http-connection-from-servlet
via IFTTT