I have 10 column in my list.Among for 10 columns 5 are coming from database and rest is manually inserted.I want to prevent the first 5 column to being edited.I mean those data fields which is being brought from dataset.How can I do so?
You can create a custom list for this, and set the Field attributes to ReadOnly or ReadOnlyEnforced : msdn.microsoft.com/en-us/library/ms437580.aspx . (Depending on your exact needs)
You will have to do that using Visual Studio. Here's an article: Creating List Definitions with Custom List Columns for SharePoint Server 2007 : http://msdn.microsoft.com/en-us/library/ee871987(office.12).aspx.
Your 5 columns are coming from DB so I assume you don't want them on New/Edit forms. You can enable content type on the list and set these fields as hidden. This is how you can achieve it Out-of-box.
SharePoint build in ITEM LEVEL permission comes to mind if you want to assign single permission on itmes. However, as you may know, it is not reliable at all. I recommend you take a look at SharePoint column View Permission which allows users to set different permissions on SharePoint list columns: www.sharepointboost.com/columnpermission.html.