Wednesday, August 10, 2011

What is the limit of CAML in terms of characters ?

Here is the Limit:-

Limit of CAML is Max Length of String (2,147,483,647).

Tuesday, April 19, 2011

Difference between SharePoint List and document library

1. In to a document library we can upload document which are not blocked file type and some content, which get stored in Content database.
2. A list on the other hand a just piece of data, just like SQL table although it is possible to store binary content in to list as well as using attachment.
3. And with a document library we can SPFileCollection.add(string, stream) – Document Library Accept a stream, means the content can be in memory, or disk or even a TCP/IP socket.
4. But with List we Only Can SPAttachmentCollection.Add(string, byte) only accepting a byte , means the attachment must fit entirely in one continuous block memory. It this is something you do with large file , your server memory may become fragmented
5. And we Can Publish a Infopath Form Template in document Library, and this problem is rise when we submit the Form in different place then where you published the form.
6. We can’t create Folder in List but can in Doc. Library
7. Document library the Check in Check out functionality but not in List.
8. Document library support the Major and Minor Version of files and Folders. But in List only support the Major version. So that two people cannot change the same content at concurrently.
9. Some type of list have different functions like for instance people being only able to read their own posts, but these are not available in every type of list and are not available at all with document libraries and other libraries.
10. List have one special List Content type, same as list Library has also DocumentLibaray type content type.

Friday, January 7, 2011

List event handlers issue in datasheet view in MOSS

Hi,

After struggling a lot with MOSS document library event handlers I found some solution on it.

Scenario: - I need to update file name property using event handler but not from standard view of document library but from the datasheet view of it. Always getting the resolve link with some error on the view.

Solution: Finally I got the solution for this known issue (MS) in MOSS. Below is some sample code for the same.

public override void ItemUpdated(SPItemEventProperties properties)
{
try
{
this.DisableEventFiring();
string fileName = properties.AfterUrl;
fileName = fileName.Split('/')[1].ToString();
SPList list;
SPListItem item;
list = properties.ListItem.ParentList;
item = list.GetItemById(properties.ListItemId);
if (!Convert.ToString(item["Filename"]).Equals(fileName))
{
item["Filename"] = fileName;
item.SystemUpdate(false);
}
this.EnableEventFiring();
}
catch (Exception ex)
{
}
finally
{
this.EnableEventFiring();
}
base.ItemUpdated(properties);
}

Hope it will help a lot of guys we need it badly like me.