string queryStr = string.Format("from Member m,
VirtualCard v where v.IpCode = m.IpCode and  v.LoyaltyIdNumber =
'{0}'", loyaltyIDNumber);

If you use this like this, you'll have different cached query execution
plans for different ids. Try using parameters instead


v.LoyaltyIdNumber=:loyaltyIdNumber

and

.SetParameter("loyaltyIdNumber",33)



This might be one reason.

Tuna Toksöz
Eternal sunshine of the open source mind.

http://devlicio.us/blogs/tuna_toksoz
http://tunatoksoz.com
http://twitter.com/tehlike




On Thu, May 28, 2009 at 3:10 PM, Waqar Sadiq <[email protected]> wrote:

> string queryStr = string.Format("from Member m,
> VirtualCard v where v.IpCode = m.IpCode and  v.LoyaltyIdNumber =
> '{0}'", loyaltyIDNumber);
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to