Can i access database of content on different site collections?
Hi guys, Need some help for accessing database. Here is my problem. I have created contacts in 3 locations. Let say http://home/spsite, http://home/spsite2 and http://home/spsite3. at spssite, i have created contacts search. All contacts informations are there in one database. at spsite2, i have created contacts by tree view with sub category. at spsite3, i have created contacts with B'D for B'D view of all members. Questiong is that i want to write the code or any possible way for modifying DB content on all site collections when i add or delete him on http://home/spsite. Is it possible? If so, pls guide me. Thank you before hand. WSS 3.0, database embedded mssql 2005 microsoft##ssee
February 15th, 2011 12:22pm

If I understand correctly you have a 3 subsites and each of the subsites has its own contact list. You want to maintain same contacts in all the lists. What you can do is, allow modifying of contacts, adding and deleting only in one of the sites. You can do this by maintaining appropriate permissions. Then you will need to make use of event handlers to synchronize the contacts across the sites. You can write event handlers for Item Added, Edited and Deleted event. So when ever you add a contact to Site 1 it will get automatically added to Site 2 and 3 as well. I hope this helps!Regards, Mahesh
Free Windows Admin Tool Kit Click here and download it now
February 15th, 2011 6:52pm

Are you asking ways to access user profiles directly in SharePoint content DB
February 15th, 2011 11:52pm

If I understand correctly you have a 3 subsites and each of the subsites has its own contact list. You want to maintain same contacts in all the lists. What you can do is, allow modifying of contacts, adding and deleting only in one of the sites. You can do this by maintaining appropriate permissions. Then you will need to make use of event handlers to synchronize the contacts across the sites. You can write event handlers for Item Added, Edited and Deleted event. So when ever you add a contact to Site 1 it will get automatically added to Site 2 and 3 as well. I hope this helps! Regards, Mahesh yes you are right. But how do i make use of event handlers? where should i write? with SPD? Never heard before. Please write details instruction for dammy :P. Thank you. BTW I know how to write workflow on SPD. And I am trying to add database from SPD, my DB is at the same domain and call CRM\microsoft##ssee. Default DB when i installed WSS 3. But i can't add that DB in SPD. Why? with user, without user, same problem. Can't access DB.
Free Windows Admin Tool Kit Click here and download it now
February 16th, 2011 4:02am

@prasad06k no.
February 16th, 2011 4:12am

You will have to make use of visual studio and C#/VB.Net to write code for event handlers. Workflows can help here but I think workflows cannot be triggered on delete. You can try a SPD workflow for item add and edit events. More details on event handlers can be found here http://msdn.microsoft.com/en-us/library/ms453149.aspx You should also look at why you need to have the same contact list across three sub sites? Using SPD you can access data which reside in other sites. Regarding the second question on DB, I guess you are trying to add an external database as a data source for creating data view web parts, is that right? Try accessing that database first from some other client software like, infopath or MS Access etc. Regards, Mahesh
Free Windows Admin Tool Kit Click here and download it now
February 16th, 2011 2:51pm

You will have to make use of visual studio and C#/VB.Net to write code for event handlers. Workflows can help here but I think workflows cannot be triggered on delete. You can try a SPD workflow for item add and edit events. More details on event handlers can be found here http://msdn.microsoft.com/en-us/library/ms453149.aspx You should also look at why you need to have the same contact list across three sub sites? Using SPD you can access data which reside in other sites. Regarding the second question on DB, I guess you are trying to add an external database as a data source for creating data view web parts, is that right? Try accessing that database first from some other client software like, infopath or MS Access etc. Regards, Mahesh I think i need to access buildin DB for using VS C# for event handlers. isn't? I need to use same contact coz company need tree view and search contact. One is for Birthday on Home page. I can't access contacts list from home page which is on other site collection. So i made new list contacts :(. So i got 3 same contact with different fields. one is with B'D, one is all contacts, and the other one is for tree view with different categoy(notes). So when someone from admin delete or modify at treeview, i want to get data fields what he wants to modify, then change the other site collections with that modifying data. Is it possible? Or is there any other way to connect with one contact list from different site collections?
February 16th, 2011 3:09pm

any reply? :(
Free Windows Admin Tool Kit Click here and download it now
February 20th, 2011 6:43pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics