I got the above error when doing some specific step of operation in the foreach loop. One of that operation is to modify the content of the enumerations. Pls note that I'm not removing any entry just changing its value.
The only way to get around this problem is to use the classic for loop. The resultant code is not as elegant as foreach but anyway works so np :)
Just 1 question doesn't foreach internally execute the classic for loop, then why is classic for loop possible but not foreach
Saturday, December 22, 2007
Create SQL Query for all SPs

This is something that everybody knows but I dono.
How to take the backup of all the SPs in your DB and create it as a single query.
I know how to generate queries for individual SP but dint know how to do it for all.
This is how it should be done:
Open the Object Explorer and click on the Stored Procedure folder.
Then you should see a tab listing all the SPs in the right.
Click on all the SPs and right click then and save in a file.
The Screenshot above is not accurate this is taken from System Stored Procedures just to give an Idea.
Tuesday, December 18, 2007
Get the URL of the host from the UserControl
this.Parent.Parent.Page.AppRelativeVirtualPath gives the URL
another way is:
public static string GetLocalPath
{
get
{
string path = "~" + HttpContext.Current.Request.Url.LocalPath;
path = path.ToLower();
return path
}
This query can be placed in Global.asax.cs and can be used by both the UserControl and any page.
another way is:
public static string GetLocalPath
{
get
{
string path = "~" + HttpContext.Current.Request.Url.LocalPath;
path = path.ToLower();
return path
}
This query can be placed in Global.asax.cs and can be used by both the UserControl and any page.
Saturday, December 15, 2007
IE7 Internet Explorer has stopped working issue
I bought a new laptop loaded with IE7 and I've been facing the IE stopping issue from day 1. I did many things but it dint work. I got a simple solution from the below blog and it helped.
http://petesbloggerama.blogspot.com/2007/02/ie7-vista-internet-explorer-has-stopped.html
http://petesbloggerama.blogspot.com/2007/02/ie7-vista-internet-explorer-has-stopped.html
Subscribe to:
Comments (Atom)