Hi Paul,
I didn't see that you'd responded to the thread; my apologies for not responding sooner.
The exception you posted indicates that there is an issue with the return value of the AddTab stored procedure. The relevant call is:
Return CType(SqlHelper.ExecuteScalar(ConnectionString, DatabaseOwner & ObjectQualifier & "AddTab", GetNull(PortalId), TabName, IsVisible, DisableLink, GetNull(ParentId), IconFile, Title, Description, KeyWords, Url, GetNull(SkinSrc), GetNull(ContainerSrc), TabPath, GetNull(StartDate), GetNull(EndDate), GetNull(RefreshInterval), GetNull(PageHeadText), IsSecure, PermanentRedirect), Integer)
And here, the CType(..., Integer) is the only possible element of the call hierarchy that could be producing this exception (I am looking at the 4.8.4 code; I no longer have a copy of 4.8.3 on my machine). Clearly your AddTab stored procedure is returning DBNull, where an integer is expected.
This leaves us with the question as to why this is occurring, and that is unfortunately more difficult to determine. The AddTab SP itself is very straightforward, and there is little room for error there. One possibility is that you are submitting a tab name that is longer than fifty characters, but I assume this is not the case.
Your next step is attempt manual execution of this stored procedure. Log in as a host, go to Host->SQL, and execute the following script:
SET XACT_ABORT ON
DECLARE @PortalId int
DECLARE @TabId int
SELECT TOP 1 @PortalId = PortalId FROM Portals
SELECT TOP 1 @TabId = TabId FROM Tabs WHERE PortalId = @PortalId
BEGIN TRANSACTION
EXEC AddTab
@PortalId, 'tab name', 0, 0, @Tabid, '', 'title', 'description', '',
'url', '', '', 'path', '1/1/2000', '1/1/2000', 0, 'text', 0
ROLLBACK TRANSACTION
Note that if you have a different databaseowner or objectqualifier defined, you will need to modify the SQL above.
What result do you receive? If it is not a single numeric value, post any error here.
Hope this helps you move forward!
Brandon