I have a query i.e. select col1 from tab1 where col1 like '%p'
I have an index defined on col1.
How can i rewrite the query to make the index seek instead of index scan?
View Complete Post
Danny Simmons explores some anti-patterns you should look out for when building n-tier applications with the Entity Framework.
MSDN Magazine June 2009
Exploits using SQL injection have drawn a lot of attention for their ability to get through firewalls and intrusion detection systems to compromise your data layers. Whether it's a first-order or second-order injection, if you look at the basic code pattern, it is similar to any other injection issue where you use untrusted data in the construction of a statement.
MSDN Magazine November 2006
You can combat deadlock using a combination of disciplined locking practices which Joe Duffy aptly explains in this article.
MSDN Magazine April 2006
On the conference circuit recently, I was speaking about some of my favorite new features in the MicrosoftÃÂ® . NET Framework 2. 0, using the content of three recent columns in this series as fodder. In my talk I sped through generics, operator overloading, and the BackgroundWorker component, all in the space of an hour (for the columns, see Advanced Basics: Being Generic Ain't So Bad, Advanced Basics: Calling All Operators, and Advanced Basics: Doing Async the Easy Way).
MSDN Magazine September 2005
Load testing should be part and parcel of every Web development effort, and it should be performed early in the process. However, if you think you can load test using your development environment, you're going to have some surprises when you go live. In this article, the authors outline the process of planning your load testing effort, considering which machines to use, how many users to simulate, which tools are right for you, and how to interpret your results.
Jeff Dunmall and Keith Clarke
MSDN Magazine January 2003
MSDN Magazine June 2002
'constantes para auxiliar na verificaÃÂ§ÃÂ£o do cÃÂ³digo
Private Const Ascendente As Byte = 0
I am writing a simple web server that uses HttpListner (http.sys) as a listener and an output conduit, and a SimpleWorkerRequest to process ASP.NET requests. All works well, but when an application my server hosts outputs chunked response, ASP.NET calls SimpleWorkerRequest's SendResponseFromMemory() method and passes in data that is chunked-encoded. When I write the output to HttpListener's output stream, it gets chunk-encoded again, breaking the whole thing. So I ended up writing chunked decoder in the middle, which makes it inefficient because the response gets massaged three times instead of one:
My question is how do I tell either SimpleWorkerRequest or HttpListener not to chunk-encode the response so the encoding can be done only once by either of those? (Preferably, it's SimpleWorkerRequest that needs an option to pass the response to the web server without changing it so that HttpListener would encode all responses, whether the come from ASP.NET or not, for example from CGI request processor).
The issue is two fold in my ASP.NET Web Application. I need to use a custom Distinct() via LINQ to SQL, and then assign thevar as a DataSource to a GridView. If I use the custom Distinct that implements IEqualityComparer, I get "Unsupported overload used for query operator 'Distinct'" exception. but if i somehow get past this, i get "The data source does not support server-side data paging" exception on GridView.DataBind(). here is the code:
(from emp in wsq.LIT_Active_Employees
where (String.IsNullOrEmpty(ssFirstName.Text) ? (emp.FIRST_NAME == null || emp.FIRST_NAME.StartsWith(String.Empty)) : emp.FIRST_NAME.Contains(ssFirstName.Text)) &&
(String.IsNullOrEmpty(ssLastName.Text) ? (emp.LAST_NAME == null || emp.LAST_NAME.StartsWith(String.Empty)) : emp.LAST_NAME.Contains(ssLastName.Text)) &&a
Good morning everyone,
Any ideas how I can use an "IN" operator with a SelectCommand Parameter.
"SELECT * FROM tblEIT WHERE DEPT_ID IN (@DEPTS)"
Where @DEPTS is a value stored in a Cookie. Cookie("DEPTS").Value is "232,243,250"
I keep getting an nvarchar to smallint conversion error. Has anyone ever tried to do this?