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've developed a custom module on SharePoint which uses a different database from the SharePoint database.

How should I setup this database? Should I show a database configuration form when you first visit the module and then take the database configuration and run the database script? or Is there a better way around to do this? One other thing that came to mind is when the administrator activates the feature I could show a form where I take database configuration input rather taking it when they try to visit the module?

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

An often used approach is to use a custom application page hosted in Central Administration to manage this. There's a Visual How To by Ted Pattison about creating an application page. Just adapt the approach so that when the feature is activated, your custom page shows up in Central Admin.

Then make that custom admin page the UI for creating and managing your custom database. Karine Bosch has several articles about the controls that SharePoint uses in its admin pages so you can maintain that look and feel. If the database takes a while to create then use SPLongOperation so users see a spinner and feel like something is happening.

It's not a good idea to put heaps of code in feature activation as it's hard to debug - there's not really a UI if things go wrong.

share|improve this answer
    
The best answer I ever had on sharepointoverflow. love'ya! –  Anonymous Feb 23 '10 at 12:56
    
Thanks Alex. Any idea how to open an application page on feature activation? –  Anonymous Feb 23 '10 at 13:01
    
@Ramiz: Happy to help! I don't know if you can redirect once the feature has been activated. Ask a new question about this as someone else might! –  Alex Angas Feb 24 '10 at 2:12
    
@Alex Thanks a lot! –  Anonymous Feb 24 '10 at 8:08
add comment

Your Answer

 
discard

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