Developer forum

Forum » Development » Database module registration

Database module registration


Reply
What tabels do dynamicweb update when an developer uses the module developer tool in the backend to register newly developed modules, im asking because we would like to automaticly register our module in the database instead of using the dynamicweb developer module.

Replies

 
Reply
Hi there,

AFAIK, only the Module table. But the best way to find this out is to use the SQL Server Profiler and then register a module. That way you can see the exact SQL statements used to register the module which you can then copy and paste.

 

Cheers,

Imar

 
Reply

You could also do it programmatically. It would look something like this...

var moduleSystemName = "MyAmazingModule";
 
if (!Base.IsModuleInstalled(moduleSystemName, true))
{
var module = new Dynamicweb.RegisterModules.Module
{
SystemName = moduleSystemName,
Description = "bla bla",
Script = "/CustomModules/MyAmazingModule/MyAmazingModule_Backend.aspx",
ControlPanel = "/CustomModules/MyAmazingModule/MyAmazingModule_Cpl.aspx"
};
module.Save();
}

/Morten


 
Reply
 Arh yeah great tip very usefull for other situation

And Thanks morten a much easier solution then updating the database with our own code

wasent aware that there was a API solution to this :) 
 
Reply
>> wasent aware that there was a API solution to this

Neither did I; cool stuff..... ;-) Thanks Morten

In case someone wants a bit more detail on this, check out this article on my company's web site: http://devierkoeden.com/Articles/[articleId/40]/Custom-Modules---Part-9---Auto-Registering-Modules.aspx

Cheers,

Imar

 

You must be logged in to post in the forum