Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have a custom list that contains a row of data. The data in the list is created from the data in the table in the SQL table. I need to check the data in database table and the data in the list is same in the load event of the ist and if it is not make it updated in the list as it is in the sql table. How can i impliment this?

share|improve this question
    
I am afraid, your answer accept rate is 0% ... which is very bad and that is why your questions are ignored! –  Arsalan Adam Khatri Nov 20 '12 at 19:37
add comment

1 Answer

You can write Event Receiver and on ItemAdding event, check what you need...

But why you are duplicating data in SQL Table and SharePoint List... Is that a necessity? Are you aware of External Content Types and Business Connectivity Services [if using SharePoint Enterprise]

share|improve this answer
    
Hi, I need to create only one row of the table in the list and keep it up to date. and we are not using BCS due to some technical issues. I was checking for some alternatives for the same. And the usera are not directly add the items into the list,item is getting added to the list programmatically, and the data in the table can be updated in some another way too... so need to keep the list up to date with the sql table, without any delay... thought ot of sharepoint timer job, but there can be delay in updation, so the option has been left.. –  Anu Nov 20 '12 at 20:28
    
Okay.. so when is the item being added pro grammatically? Is it a Visual Web Part, an Event Receiver..? You can use Entity Framework 4.0 and make EDMX file for your database table and use that for adding/updating items in Database... And since the list item is pro grammatically added, you can do it just after adding the list item? –  Arsalan Adam Khatri Nov 21 '12 at 6:25
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.