Fórmulas e Cenas

Object Reference Not Set to an Instance of an Object

  Home  |   Contact  |   Syndication    |   Login
  45 Posts | 0 Stories | 16 Comments | 0 Trackbacks


Article Categories



February 2010 Entries

Sometimes we find some code that... well.... I guess someone must be really REALLY high to write...


The WTF way



The right way:






I think it's common knowledge that timeouts can be set on connection strings to ensure that a certain connection doesnt say open for more than SSS seconds. What is not so common knowledge is the fact that on a transaction every single command has its own timeout value and if exceded it can bring down the entire transaction. So when using transactions take in mind that you can set the connection timeout to 20 minutes, but if a single command that takes a few extra seconds can timeout. To prevent this ......

Response.Clear();Response.C... = "application/pdf";Response.... "attachment;filename=\"File... SourceEnjoy :) ......