Firstly - you should avoid directly call Core stored procedures
- you are asking for all sorts of trouble down the track with managability.
Instead you should handle this sort of thing thru the controllers built into DNN.
Dim objTabs As New TabController
Dim objTab As New TabInfo
With objTab
objTab.TabID = TabId
objTab.PortalID = PortalId
objTab.TabName = txtTabName.Text
objTab.Title = txtTitle.Text
objTab.Description = txtDescription.Text
etc etc
Making sure to set all the properties - especially expiry dates and isDeleted=False
End With
'Add the new tab
objTab.TabID = objTabs.AddTab(objTab)
'Update the UrlController
Dim objUrls As New UrlController
objUrls.UpdateUrl(PortalId, ctlURL.Url, ctlURL.UrlType, 0, Null.NullDate, Null.NullDate, ctlURL.Log, ctlURL.Track, Null.NullInteger, ctlURL.NewWindow)
' This is important - you need to make sure the cache is flush or the tab wont appear
DotNetNuke.Common.Utilities.DataCache.ClearModuleCache(TabId)
Westa