Tuesday, May 05, 2009

Sharepoint - How to Rename Content Database Name of Live Sharepoint Site

Sometimes it is requirement to change the name of Content database after setting complete Sharepoint site. If you've such requirement then following is a solution -

  1. Open SQL Server Management Studio.
  2. Go to Content Database node in Database explorer
  3. Take the database Offline
  4. Detach the database from Sharepoint using Sharepoint Central Administration.
  5. Back up the database using SQL Server Management Studio
  6. Restore the database using desired name
  7. Re-attach the database to Sharepoint using Sharepoint Central Administration.

Complete.

Sunday, January 04, 2009

Sharepoint...

Very soon.... You will find posts related to Sharepoint, WSS 2.0, WSS 3.0 and MOSS .....

Friday, May 11, 2007

Microsoft SQL Server "Katmai" (Next Release after SQL Server 2005)

Upcoming version of SQL Server 2005, code name "Katmai" will be released in 2008.

Microsoft stated:
Katmai will help companies access and manage rapidly increasing volumes of data for mission-critical applications, increase their ability to better understand the organization with business insight, and reduce difficulties associated with managing complex systems. SQL Server “Katmai” builds on the success of SQL Server 2005 as a proven platform that is crucial to the completion of business projects, delivering increased functionality to a comprehensive range of applications from the desktop to the data center.


Ted Kummert, corporate vice president of the Data and Storage Platform Division at Microsoft, said:

“We developed SQL Server with the goal of providing a data management and analysis platform for all companies regardless of size or budget, With the release of ‘Katmai,’ we’ll take the next step on our data platform vision by delivering a comprehensive and integrated business intelligence solution. Expanding the usability of data across businesses will give customers more value for their IT investments.”


Few Important links for Katmai:

http://www.microsoft.com/sql/prodinfo/futureversion/default.mspx
http://www.microsoft.com/presspass/press/2007/may07/05-09KatmaiPR.mspx
http://download.microsoft.com/download/B/F/2/BF24C54E-5635-4C79-AFB4-0C3F840E79F4/Katmai_datasheet_Final.pdf

Wednesday, December 20, 2006

System.Collections.Generic

Generic is a new feature introduced in C#. It is nothing but a type-safe collection. Generic collection can store only items that are compatible with argument type specified in declaration. Moreover generic collection works in similar way like non-generic collection, only the difference is to mixed types are not allowed. Non-generic collections are useful in case if you want to mix-up unrelated data types. List, Dictionary are example of C# generics.

Example:

using System;
using System.Collections.Generic;

class GenericDemo
{
public static void Main()
{
List lstInteger =new List();

//Add elements to generic integer list
//Correct entry as per generic
lstInteger.Add(1);
lstInteger.Add(2);
lstInteger.Add(3);
lstInteger.Add(4);
lstInteger.Add(5);


//Code exception due to following wrong entry
lstInteger.Add(‘Kuldeep’);
}
}


Because of type-safety principle, in above example it will throw error at last lstInteger.Add(‘Kuldeep’) statement. Current declaration for generic is an integer and at last statement you'r trying to insert is a string type. So it will raise exception.

Tuesday, December 19, 2006

The Mutex (C# - Threading)

Mutex is used to set exclusive access on shared resources in multi-thread programs. This means only one thread can access shared object at a time. A mutex is a perfect synchronization mechanism in C# threading.

Consider a example of when two threads accessing same system resources like files, system registry, Environment variables, etc. And you want to put exclusive access in multithreaded environment on shared resources then this can be achieved using mutex.

System.Thread.Mutex Class:

Above class supports Mutex.

To acquire Mutex call WaitOne()

To release Mutex call ReleaseMutex()

Example:

using System.Threading;

Mutex objMutex = new Mutex();

//Some code goes here

objMutex.WaitOne(); //Acquire

//Code to get exclusive access

//.....

objMutex.ReleaseMutex(); //Release

Mutex Code Snippet:

using System.Threading;

class FileAccess

{

public static Mutex mtx = new Mutex(); //Mutex variable

//Method to read/write in File

}

class FirstThread

{

public Thread t1;

//Uses above class method to R/W file

FirstThread()

{

t1= new Thread(this.CallFileWrite);

t1.Start();

}

void CallFileWrite()

{

FileAccess.mtx.WaitOne();

Console.WriteLine(“t1: In Mutex ”);

//File writing code ......

Console.WriteLine(“t1: Out Mutex ”);

FileAccess.mtx.ReleaseMutex();

}

}

}

class SecondThread

{

public Thread t2;

//Uses above class method to R/W file

SecondThread()

{

t2= New Thread(this.CallFileWrite);

t2.Start();

}

void CallFileWrite()

{

FileAccess.mtx.WaitOne();

Console.WriteLine(“t2: In Mutex ”);

//File writing code ...... for same file in t1 thread

Console.WriteLine(“t2: Out Mutex ”);

FileAccess.mtx.ReleaseMutex();

}

}

class MutexExample

{

void main()

{

FirstThread mFt1 = new FirstThread();

SecondThread mSt2 = new SecondThread();

MFt1.t1.Join();

MSt2.t2.Join();

}

}

Exception Handling in C#

Exception class is used to handle errors occurred during execution of code. Following are public members of exception class:

HelpLink : Used to set help link for exception.

InnerException: Gets the exception instance that caused the current exception.

Message: Exception description.

Source: Object that caused exception

StackTrace: Call stack for occurred exception.

TargetSite: Method that throws the exception.

Simple exception handling code block:

try

{

// Code statements.

}

catch(Type x)

{

// handling of the exception

}

finally

{

//cleanup code (if any)

}

Note: Catch block is optional in C#. And Finally block always execute.

Multiple Catch Blocks: (All good Programs must be able to uniformly handle errors that occur during code execution.)

try

{

//Your code goes here

}

catch(DivideByZeroException dz)

{

//Divide by zero exceptions will be handled here.

}

catch(OutOfMemoryException oe)

{

//Out of memory exceptions will be handled here.

}

catch(NullReferenceException ee)

{

//Null refernce exceptions will be handled here.

}

catch(Exception ex)

{

//Unknown exceptions from above 3 types will be handled here.

}

finally

{

//Always executes at the end.

}

Some Other Exception types:

IndexOutOfRangeException (Occures in looping when Index is out of range)

InvalidOperationException (Thrown by methods when in an invalid state.)

ArgumentNullException (Thrown by methods that do not allow an argument to be null.)

ComException (COM components)

InvalidCastException

ArithmeticException

SqlException (For DB related exceptions)

ApplicationException Class:

If you are designing an application that needs to create its own exceptions, derive from the ApplicationException class. ApplicationException extends Exception class.

To know more about structured and ApplicatioException handling goto http://www.devcity.net/Articles/284/1/article.aspx (This is supported by Microsoft)

Best practices to handling exceptions:

URL:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconbestpracticesforhandlingexceptions.asp

Sunday, October 15, 2006

Building Easy Navigation Using the ASP.NET 2.0 MultiView and Wizard Controls

ASP.NET 2.0 introduced over 50 new controls including the MultiView and Wizard controls. In this article Kuldeep Deokule will show you how to use the MultiView and Wizard controls to build an easy to navigate web application. He will explain the use of the MultiView control using an online survey application and Wizard control using a User Registration application. He will also show how the use of these two controls greatly reduces the amount of code required to be written, as compared to previous versions of ASP.NET. More...

Monday, October 02, 2006

The Development Tools for .NET Framework 3.0 : " Orcas "

The Development Tools for .NET Framework 3.0 (SEPTEMBER CTP) provides developers with support for building .NET Framework 3.0 applications using the final released version of Visual Studio 2005. These tools are provided as an early preview of technology being considered for the Orcas release of Visual Studio.

Visit URL for download Orcas:

http://www.microsoft.com/downloads/details.aspx?FamilyID=cc77abfa-a000-48d0-98c9-4ae083033d09&DisplayLang=en

Thursday, September 21, 2006

Why SOA?

1. Service oriented
2. Agile development
3. Removes complexity
4. Supplies common programming interface and interoperability protocol
5. Easy up-gradation
6. Lead towards automated business automation
7. Based on XML
8. Web service platform
9. Reusability
10. Loosely coupled
11. Ease in integration process.
12. Able to leverage existing application and infrastructure
13. Less maintenance cost involved.
14. Reduces hardware cost.
15. Leverage existing development skills
16. Faster application development.
17. Eliminate redundant systems and architecture.
18. Reduce project risk
19. Secured.
20. Flexibility

Sunday, September 03, 2006

Brief on SOA:

The buzzword SOA means Service Oriented Architecture. SOA is loosely coupled in nature. It based on SOAP (Simple Object Access Protocol). As per World Wide Web Consortium (W3C) SOA is 'A set of components which can be invoked, and whose interface descriptions can be published and discovered'.

By using SOA architecture it is possible to develop abstract, reusable, relevant, standard, consumable and standardized solutions.

SOA plays major role in enterprise level integration.

Visitor Count: